Page 1 of 1
feof
Posted: Wed Dec 31, 2003 12:51 am
by seadoo
Why am I getting compile error if i use:
[c]if(feof(stdin))
return;[/c] ?
Posted: Wed Dec 31, 2003 3:51 am
by Krzysztof Duleba
You didn't provide enough information to tell. What kind of CE do you receive? Does it happen on your computer, or only on OJ? Did you include stdio.h?
Posted: Wed Dec 31, 2003 6:44 pm
by seadoo
Oh, sorry. I am getting the compile error only on OJ. At home I use Visual C#, but I am coding in C. And I have a lot of problems accepted, but in this one I am using feof(stdin) and there is where I am getting compile error (if I remove it from the code, it's OK, but then I get WA).
And I didn't include stdio, but neither I have on my computer. Will try with it, thanks.
Posted: Wed Dec 31, 2003 6:57 pm
by seadoo
Hey thanks, man, I included stdio.h and it worked OK - I got AC.
I know stdin.h, but didn't know I have to include it. It's maybe the fault of this stupid MS compiler, in which you don't need to include it
I really appreciate your reply.