标签: c header scanf printf pgm
我在尝试将pgm的标头复制到另一个时遇到错误。有人可以告诉我我哪里错了吗?
FILE *infile; infile = fopen(fin, "rb"); fscanf(infile, "%s %d %d %d\n",&type,&u,&v,&depth); FILE *outfile; outfile = fopen(fout, "wb"); fprintf(outfile, "%s %d %d %d\n",&type,u,v,depth);