、、、、、、、、、、、、、、代码如下、、、、、、、、、、、、、、、
#include "stdafx.h"
#include "stdlib.h"
int _tmain(int argc, _TCHAR* argv[])
{
FILE *fpGrade;
fpGrade = fopen("C:/tx.txt","rb");
if (fpGrade == 0)
{
printf("\nConnot open file\n");
}
fseek(fpGrade,0,SEEK_END);
int len = ftell(fpGrade);
fseek(fpGrade,0,SEEK_SET);
char *pbuffer = new char[len];
fread(pbuffer,1,len,fpGrade);
printf("%s",pbuffer);
system("PAUSE");
}
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
编译出现以下错误:
debug assertion failed!(后面一大串)
、、、
在同学的电脑上运行相同的程序没有错,并打印txt内容,但是在我的电脑上却不行,蛋疼、、、、
--