比如
fp内容:"how are you";
fscanf (fp,"%d",&a);
fscanf (fp,"%d",&b);
a输出how
b输出are吗?
为什么第二次调用fscanf自动跳过空格?
比如
fp内容:"how are you";
fscanf (fp,"%d",&a);
fscanf (fp,"%d",&b);
a输出how
b输出are吗?
为什么第二次调用fscanf自动跳过空格?
3 回答1.3k 阅读✓ 已解决
1 回答2.3k 阅读
1 回答1k 阅读✓ 已解决
4 回答810 阅读
1 回答883 阅读
1 回答913 阅读
1 回答683 阅读
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).
http://www.cplusplus.com/refe...