Name: Anonymous 2007-07-26 18:16 ID:fISZ2I3i
This doesn't work, but I want to do something like this:
That is,
1) I want to declare two variables
2) I want them to only have scope of the for loop, and
3) I want them to be initialized only once, not every pass through the loop.
Is there any way to do it besides using awesome goto statements or wrapping the whole loop in braces and declaring i and s there?
for(int i = 0, bool s = true; ..... ; .....)
{
......;
}That is,
1) I want to declare two variables
2) I want them to only have scope of the for loop, and
3) I want them to be initialized only once, not every pass through the loop.
Is there any way to do it besides using awesome goto statements or wrapping the whole loop in braces and declaring i and s there?