So, where the input stream ends ?
As I understand the user can use new line to seperate the numbers, but how can we know which "Enter" is the last one (or the input stream ends) ?
Re: So, where the input stream ends ?
See FAQ.
Re: So, where the input stream ends ?
Thanks.
Any examples for C# ?
Re: So, where the input stream ends ?
Ask Vladimir Yakovlev...
Re: So, where the input stream ends ?
Posted by
Squid 7 Jan 2007 03:13
And example for Java, plz
Re: So, where the input stream ends ?
Read with Console.Read() char by char. When the end of input stream was reached method returns -1.
Re: So, where the input stream ends ?
Also, you can use
Console.In.ReadToEnd();
Re: So, where the input stream ends ?
Posted by
Squid 9 Jan 2007 01:57
Read with Console.Read() char by char. When the end of input stream was reached method returns -1.
Will Reader.read() in Java have the same effect?
Re: So, where the input stream ends ?
Java :
while((line = f.readLine()) != null)
{
...
}
Re: So, where the input stream ends ?
?? I tried that and it didnt work... the program never stops... Does anybody know how to stop the infinite loop?