官方介绍 http://www.cplusplus.com/reference/cstdio/scanf/
C string that contains a sequence of characters that control how characters extracted from the stream are treated:
Whitespace character: the function will read and ignore any whitespace characters encountered before the next non-whitespace character (whitespace characters include spaces, newline and tab characters – see isspace). A single whitespace in the format string validates any quantity of whitespace characters extracted from the stream (including none).
Non-whitespace character, except format specifier (%): Any character that is not either a whitespace character (blank, newline or tab) or part of a format specifier (which begin with a % character) causes the function to read the next character from the stream, compare it to this non-whitespace character and if it matches, it
最后
以上就是温柔发卡最近收集整理的关于c++ scanf函数的全部内容,更多相关c++内容请搜索靠谱客的其他文章。
发表评论 取消回复