假设我有一个文件的读取:阅读使用C中的fscanf另一个新线
//it may contain more than 2 lines
12 6
abadafwg
现在假设我已经阅读了第一行是这样的:
char input[999];
while(!feof(fpin))
{
fscanf(fpin, " %[^\n]", input);
//do something here with these numbers
//should do something here to read 2nd line
}
这里是我的问题,我该如何阅读该文件的第二行? 请帮助QAQ
'fscanf(fpin,“%[^ \ n]”,input)'相同,但是有空格 – chux
什么是“输入”? – 0decimal0
@PHIfounder它的字符串 –