执行出错,而且还无法调试
程序代码:
#include<stdio.h> #include<stdlib.h> #define NUMBER 100 int main(int argc,char *argv[]) { char capy[NUMBER]; FILE *file1,*file2; printf("plese input a filename.\n"); if(file1 = fopen(argv[1],"rb") == NULL) { printf("%s",argv[1]); exit(1); } if(file2 = fopen(argv[2],"wb") == NULL) { printf("%s",argv[2]); exit(1); } fgets(capy,NUMBER,file1); fputs(capy,file2); return 0; }