标签:blog http os io 2014 ar log file
vs2008 调试报错
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
FILE *fp,*ofp;
void filecopy(FILE *,FILE *);
if(argc == 1)
filecopy(stdin,stdout);
else
while(--argc>0)
if((fp=fopen(*++argv,"r"))==NULL)
printf("cat:can‘t open %s\n",*argv);
else{
if((ofp=fopen(*++argv,"a+"))==NULL)
printf("cat:can‘t open %s\n",*++argv);
else
filecopy(fp,stdout);
//fclose(fp);
}
}
void filecopy(FILE * ifp,FILE * ofp)
{
int c;
while((c=getc(ifp))!=EOF)
putc(c,ofp);
}
debug assertion failed,布布扣,bubuko.com
标签:blog http os io 2014 ar log file
原文地址:http://www.cnblogs.com/zhangxiujun/p/3876761.html