home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!news.service.uci.edu!unogate!mvb.saic.com!ncr-sd!sagpd1!monty
- From: monty@sagpd1 ()
- Subject: GCC vs c++ question
- Message-ID: <1992Sep4.151221.12097@sagpd1>
- Reply-To: monty@sagpd1.UUCP (Monty Saine)
- Organization: Scientific Atlanta, Government Products Div, San Diego, CA
- Date: Fri, 4 Sep 1992 15:12:21 GMT
- Lines: 20
-
- Here is a program fragment:
-
- int min =1; // global min
- int main(void)
- {
- int min = 5; // internal min
- cout << "min 1 is: "<<min--<<"\n";
- {
- int min = 9; // yet another min
- cout << "min 2 is: "<< ++min<<"\n";
- cout << min 3 is: "<< --::min<<"\n";
- }
- return 0;
- }
-
- The question is, is the C++ syntax for min 3, --::min or ::--min.
- Gcc wants it the way in the example. Is that the correct syntax?
-
- Monty Saine
-
-