全部博文(403)
分类: C/C++
2006-08-01 18:04:48
int fscanf(FILE *stream, char *format, );
char fgets(char *string, int n, FILE *steam);
int fgetc(FILE *steam);
例子:
#include
main()
{
FILE *fp;
char str[6000];
if((fp=fopen("1.txt","rt"))==NULL)
{
printf("cannot open file strike any key exit!");
getch();
exit(1);
}
fgets(str,1000,fp);
printf("%s",str);
fclose(fp);
getch();
}