Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
deleted 3 characters in body
Source Link
bames53
  • 88.7k
  • 15
  • 191
  • 255

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.

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.

Source Link
bames53
  • 88.7k
  • 15
  • 191
  • 255

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.