#include <stdio.h>
#define MAX 255
int main(int argc,char *argv[])
{
FILE *fp,*fp2;
char ch;
char c[]={“askdbjfkabskfb”};
int i;
/*
if((fp=fopen(argv[1],”rt”))==NULL)
{
printf(“error”);
exit(1);
}
while(!feof(fp))
{
ch=fgetc(fp);
putchar(ch);
}
*/
if((fp2=fopen(argv[1],”wb”))==NULL)
{
printf(“error”);
exit(1);
}
for(i=0;i<MAX;i++)
fprintf(fp,”%s”,c);
fclose(fp);
}
这个程序,一运行就出现,
应用程序错误
0x004042dc指令引用的0xccccccdc内存,该内存不能为read
超级郁闷的?那里有问题呢?
>> 本文固定链接: http://www.vcgood.com/archives/3008