出错:[Error] expected declaration or statement at end of input
程序代码:
#include<stdio.h> #include<stdlib.h> int main(int argc,char *argv[]) { int ch; FILE *source,*destination; if ( (source = fopen(argv[1],"rb")) == NULL) { printf ("Can't open %s\n", argv[1]); exit(1); } if ( (destination = fopen(argv[2],"wb")) == NULL) { printf ("Can't open %s\n", argv[2]); exit(1); } while ((ch = getc(source)) != EOF) putc(ch,destination); fclose(source); fclose(destination); printf ("copy finished\n"); return 0;