开发者

Will istream::get() with no parameters return whitespace?

开发者 https://www.devze.com 2023-02-20 13:51 出处:网络
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

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

精彩评论

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