C++ allows you to do this:
for( struct {int x; float y;} s; s.x<10; s.x++,s.y*=2.0f) { } MSVC has a bug such that it does not allow this, but anymore standards compliant compiler willcompilers allow it.
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalC++ allows you to do this:
for( struct {int x; float y;} s; s.x<10; s.x++,s.y*=2.0f) { } MSVC has a bug such that it does not allow this, but anymore standards compliant compiler willcompilers allow it.
C++ allows you to do this:
for( struct {int x; float y;} s; s.x<10; s.x++,s.y*=2.0f) { } MSVC has a bug such that it does not allow this, but any standards compliant compiler will allow it.
C++ allows you to do this:
for( struct {int x; float y;} s; s.x<10; s.x++,s.y*=2.0f) { } MSVC has a bug such that it does not allow this, but more standards compliant compilers allow it.