Will istream::get() with no parameters return whitespace?
This seems like a really simp开发者_C百科le question, but I can't find the answer anywhere. If I'm parsing a file (that includes newline characters) character by character, using
char next = file.get();
will the following check ever be true?
if (next == '\n')
Yes. It gets the next character from the stream. It does not skip newlines or whitespace.
精彩评论