home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 13090 < prev    next >
Encoding:
Text File  |  1992-09-04  |  897 b   |  31 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. 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
  3. From: monty@sagpd1 ()
  4. Subject: GCC vs c++ question
  5. Message-ID: <1992Sep4.151221.12097@sagpd1>
  6. Reply-To: monty@sagpd1.UUCP (Monty Saine)
  7. Organization: Scientific Atlanta, Government Products Div, San Diego, CA
  8. Date: Fri, 4 Sep 1992 15:12:21 GMT
  9. Lines: 20
  10.  
  11.     Here is a program fragment:
  12.  
  13.     int min =1;        // global min
  14.     int main(void)
  15.     {
  16.     int min = 5;        // internal min
  17.     cout << "min 1 is: "<<min--<<"\n";
  18.         {
  19.         int min = 9;        // yet another min
  20.         cout << "min 2 is: "<< ++min<<"\n";
  21.         cout << min 3 is: "<< --::min<<"\n";
  22.         }
  23.     return 0;
  24.     }
  25.  
  26.     The question is, is the C++ syntax for min 3,  --::min or ::--min.
  27.     Gcc wants it the way in the example. Is that the correct syntax?
  28.  
  29.     Monty Saine
  30.  
  31.