Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这似乎是一个非常简单的问题,但我无法在任何地方找到答案。如果我正在逐字符解析文件(包括换行符),请使用
char next = file.get();
以下检查会是真的吗?
if (next == '\n')
是的。它从流中获取下一个字符。它不会跳过换行符或空格。