C语言读写文件失败这是为什么,在桌面上建了个a.txt文件
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *fp;
fp=fopen("C:/Users/user/Desktop/a.txt","r+");
if(fp==NULL)
printf("文档a.txt打开失败\n");
else
printf("文档a.txt打开成功\n");
return 0;
}
C语言读写文件失败这是为什么,在桌面上建了个a.txt文件
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE *fp;
fp=fopen("C:/Users/user/Desktop/a.txt","r+");
if(fp==NULL)
printf("文档a.txt打开失败\n");
else
printf("文档a.txt打开成功\n");
return 0;
}
fp=fopen("C:\\Users\\user\\Desktop\\a.txt","r+");