ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1242. Werewolf

How can i read input in C++ (my code doesn't work)
Posted by papaga3 6 Jul 2014 09:31
    int victim;
    while (scanf("%d", &victim) != EOF)
    {
        /*do something*/
    }
it is an infinite loop
Re: How can i read input in C++ (my code doesn't work)
Posted by mss175 8 Oct 2014 23:35
scanf returns: number of the read charecter
in finish scanf return 0 but EOF value is -1