总是会出现错误(stream!= null) 这是什么意思? 我应该写一个程序然后读取数字到一个打印出来的数组。否则一切都会很糟糕(
#include <stdio.h>
#define M 4
int main() {
int i = 0, b = 0;
int myArray[M];
FILE *myFile;
myFile = fopen("D:\file1.txt", "rt");
for (i = 0; i < M; i++) {
fscanf(myFile, "%d", myArray[i]);
}
fclose(myFile);
for (i = 0; i < M; i++) {
printf("%d", &myArray[i]);
}
return 0;
}