hi,
consider this:
#include <iostream.h>
int main()
{
int $one;
cout << $one;
return 0;
}
i've tried this code on bcc 5.5 and it does not compile, but on gcc 2.95 (on linux) it compiles perfectly. why?
hi,
consider this:
#include <iostream.h>
int main()
{
int $one;
cout << $one;
return 0;
}
i've tried this code on bcc 5.5 and it does not compile, but on gcc 2.95 (on linux) it compiles perfectly. why?
GG is correct. The '$' character may not be part of an identifier under ANSI C. You can force gcc to adhere strictly to ANSI C by using the -ansi switch in your compiles. What you lose with the -ansi switch are the keywords asm, inline, and typeof (as well as some macros). The gcc man page has all the details.
Jason Deckard