#include<stdio.h>
#include <stdlib.h>
main()
{
FILE *fp;
char ch;
if((fp=fopen("d:\\ready\gong.txt","rt"))=NULL)
{
printf("\nCannot open file strike any key exit!");
getchar();
exit(1);
}
ch=fgetc(fp);
while(ch!=EOF)
{
putchar(ch);
ch=fgetc(fp);
}
fclose(fp);
}
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |