Date: Wed, 05 Mar 1997 19:41:30 -0600 From: Rickyu Subject: Confirmation about DJGPP C and C++ modes... Newsgroups: comp.os.msdos.djgpp Message-ID: <857611694.2142@dejanews.com> Organization: Deja News Usenet Posting Service Lines: 51 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi, I'm posting cuz I'm a little confused, I am relatively new to DJGPP and from the first time I used it I was really impressed by it. But when I tried something which worked fine when I was still using TC++ suddenly generated an error in DJGPP. And so I would like to have this confirmed with u guys if this is really standard DJGPP or is it a "bug", I leaveit to you guys cuz you're the experts on this. My code is as follows: #include typedef enum {SUN,MON,TUE,WED,THU,FRI,SAT} Days; ...... some codes here ....... int main() { ...... type declarations ..... Days day; for (day = SUN; day < SAT; day++) printf("Day = %d\n",day); ....... additional code ...... return 0; } When I compile this in C only mode it compiles fine, but when I use this in a C++ module the compiler generates and error message namely : no post-increment operator for type. How come this happened when I defined it already with typedef. It worked when I recompiled it in TC++. Please I need your help. Thanks a million. Don't post please e-mail Rickyu...... -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet