#include
int main(int argc, char *argv[])
{
FILE *fpr, *fpw;
char ch;
if (argc != 3)
{
printf("argument is error\n");
return -1;
}
if ((fpr = fopen(argv[1], "r")) == NULL)
{
printf("open source is error\n");
return -1;
}
printf("file number is %d\n", fpr->_fileno);
if ((fpw = fopen(argv[2], "w")) == NULL)
{
printf("open target is error\n");
return -1;
}
ch = getc(fpr);
while (ch != EOF)
{
fputc(ch, fpw);
ch = getc(fpr);
}
return 0;
}
阅读(1189) | 评论(0) | 转发(1) |