problem with for loop

hi!! can anybody explain what does this loop does,,

for(!cin)
break;

thanks..
That's nonsense.
Are you sure that it isn't if (!cin) ??
Please note that all for loops begin with the keyword for

After the keyword for you must address three separate statements within parentheses:
- An initialization statement
- A Boolean test expression
- An increment/decrement statement.

Compare this to what you have written, maybe this might help.
Topic archived. No new replies allowed.