为什么代码会出错,是编辑器设置出现了问题吗?
具体代码如下
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
int main(void)
{
FILE* fp = NULL;
fp = fopen("D:\\YWY\\test.txt","r");
if (fp == NULL)
{
perror("fopen error");
getchar();
return -1;
}
fclose(fp);
system("pause");
}
```