for and visual c++ 6.0

Started by
16 comments, last by airjy 20 years, 7 months ago
sorry i didn''t see that you had changed i to j.
i can change the name of the variable each time i have to make a for or to write i=0 juste before starting the for, but when you''re used to write the same thing : for(int i=...) without even thinking what i''m writing it''s hard to change
Advertisement
It''s a bug in VC++ 6.0. It''s fixed in .NET, with an option to undo the fix (for compatibility with 6.0 code).

How appropriate. You fight like a cow.
i have heard there is an option somewhere to change this so it works the proper ANSI way (i don''t have any details though, since i don''t use that compiler/IDE).
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
quote:Original post by MauMan
#define for if ( true ) for
That's not it; that'll behave oddly if followed be by else.

#define for if(0); else for

[edited by - Beer Hunter on September 3, 2003 6:35:11 PM]
I still don''t see why its that much of a problem, although I have been used to VC++ for a long time, so maybe its just me.
krez : The option is to "disable microsoft extensions" but it breaks the version of STL it ships with and other things so the cure is worse than the problem.
---CyberbrineDreamsSuspected implementation of the Windows idle loop: void idle_loop() { *((char*)rand()) = 0; }

As a quick aside- I reccommend you don''t use VC6''s STL. It''s an ooold implementation.

Check this out:
http://www.stlport.com
quote:Original post by MauMan
krez : The option is to "disable microsoft extensions" but it breaks the version of STL it ships with and other things so the cure is worse than the problem.

that''s what you get
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement