I am coding a program that reads data directly from user input and was wondering how could I (without loops) read all data until EOF from standard input. I was considering using cin.get( input, '' )
but ''
is not really the EOF character, that just reads until EOF or ''
, whichever comes first.
Or is using loops the only way to do it? If so, what is the best way?
Question&Answers:os