c语言的文件问题
#include<stdio.h>#include<conio.h>
main()
{
FILE *fp;
clrscr();
printf("open and close of file\n\n");
if((fp=fopen("D:\programing\c\tc20\TURBOC2\output2\p129k.c","r"))==NULL)
{
printf("can,t open test1.txt file\n");
exit(0);
}
else
{
printf("open test1.txt file succeed!\n");
printf("file point to %ld\n",fp);
printf("please press any key close file\n");
getch();
if(0==fclose(fp))
printf("file already close\n");
else
printf("file close error!\n");
}
}为什么显示can,t open test1.txt file,我要打开那个文件的话,程序怎么写。打开的文件程序能在TC界面操作吗
[ 本帖最后由 hdshdzh 于 2010-5-21 16:00 编辑 ]