加里奥中单符文:这个程序错在哪~?c语言 环境 VC++6.0

来源:百度文库 编辑:高校问答 时间:2024/04/29 15:40:28
#include<stdio.h>
#include<conio.h>
#include<process.h>
void main()
{
char ch;
FILE *p;
p=fopen("c:w.txt","w+");
ch=getchar();
while(ch!='#')
{
fputc(ch,p);
ch=getchar();
}
fclose(p);
}
编译没有问题,运行就出错误,"w+"是用于建立一个新文件吧?~

c:\\w.txt