开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜