debug assertion tailed
以下是我的源码,在vc++6.0环境下,程序执行到 fgets(line,15,fp);这一行时,就会报错,几天了还没解决
目的是想把temp.txt文件的数据一行一行读出来.我的qq:411762697.希望能得到高手指点.
#include <stdio.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
FILE *fp;
char line[10000];
main(void)
{
if((fp=fopen("E:\\09GPLB\GAME-TXT\temp.txt","r"))==NULL)
{
fgets(line,15,fp);
printf("%s",line);
getch();
fclose(fp);
}
}