在使用fscanf读取文件中的数据时采用以下代码
int main(int argc, char **argv) {
FILE *file = fopen("multiIn.txt", "r");
int data[2][6];
for (int i = 0; i < 2 ; i++) {
for (int j = 0; j < 6; j++) {
fscanf(file, "%d", &data[i][j]);
fseek(file, 1L, SEEK_CUR);
}
}
}
将以下文件内容读取到二维数组中
但是再fscanf一行会出现以下warning
Clang-Tidy: 'fscanf' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead
请求解决方法。