November 9th, 2012, 01:27 AM
once again i hit a very simple problem i am unable to resolve. I using Visual Studio 2010, but am compiling for C.
while(i=getchar() != EOF)
should imo work perfectly (yes, no real code, just to demonstrate the issue), but it doesnt. Getchar() always returns 0x01. Why is that?
This, in contrast, works perfectly fine:
Shouldnt an assignment always return the assigned value?
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.