why can't i put non-static chapter exam apportionment while loop?
you can, obviously, put non-static chapter loop:
for (int i = 0; ...
and i've beheld same thing switch statements well:
if ((int i = f()) != 0) ...
switch (int ch = stream.get()) ...
but i try same thing while loop:
while ((int ch = stream.get()) != -1) ...
the compiler (vc++ 9.0) does during all.
is agreeable behavior? there reason it?
edit: i found i this:
while (int ch = stream.get() != -1) ...
but since superiority rules, that's interpreted as:
while (int ch = (stream.get() != -1)) ...
which i want.
Comments
Post a Comment