feof

Write here if you have problems with your C source code

Moderator: Board moderators

Post Reply
seadoo
New poster
Posts: 12
Joined: Mon Dec 15, 2003 6:16 pm

feof

Post by seadoo »

Why am I getting compile error if i use:
[c]if(feof(stdin))
return;[/c] ?
Krzysztof Duleba
Guru
Posts: 584
Joined: Thu Jun 19, 2003 3:48 am
Location: Sanok, Poland
Contact:

Post 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?
seadoo
New poster
Posts: 12
Joined: Mon Dec 15, 2003 6:16 pm

Post 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.
seadoo
New poster
Posts: 12
Joined: Mon Dec 15, 2003 6:16 pm

Post 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 :wink:

I really appreciate your reply.
Post Reply

Return to “C”