完整编辑:
我很沮丧,我不知道我在这里做错了什么我仍然在代码中要做很多事情,但我什至无法打开文件来继续我的工作。
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
void main()
{
char letter;
FILE *fp;
fp=fopen("C:\\Users\\LENOVO\\Desktop\\data.txt","r");
if(fp==NULL)
{
printf("error");
getch();
exit(1);
}
while(fscanf(fp,"%d",&letter)!=EOF)
putchar(letter);
getch();
fclose(fp);
}
路径图片:http: //imgur.com/a/YwFYy
仍然打印错误