home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!smurf.sub.org!incom!orfeo!hotb.sub.org!mania.hotb.sub.org!mania!lkv
- From: lkv@mania.hotb.sub.org (Lutz Vieweg)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: GCC vs c++ question
- Message-ID: <fVnFr*cY1@mania.hotb.sub.org>
- Date: 12 Sep 92 08:50:07 GMT
- References: <1992Sep4.151221.12097@sagpd1>
- Organization: The Funny Farm
- Lines: 24
- X-Newsreader: Arn V1.00 alpha rel3
-
- In article <1992Sep4.151221.12097@sagpd1>, writes:
-
- > 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?
-
- The scope resolution operator is always part of the variable name - so
- why shouldn't that be correct?
-
- cu, Lutz Vieweg
-