[英]Read 2 int and \n with fscanf - thoughts?
In my current project for C language, I have to read from a file 2 int and make sure that after those there is a newline. 在我当前的C语言项目中,我必须从文件2 int中读取,并确保在这些文件之后有换行符。 I'm trying to use the fscanf function (fscanf(f,"%d %d",&a,&b)), but this way I don't know if these are in the same line or if there is a newline after.
我正在尝试使用fscanf函数(fscanf(f,“%d%d”,&a,&b)),但是这种方式我不知道它们是否在同一行或后面是否有换行符。
Any thoughts? 有什么想法吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.