到底哪里错了,我快崩溃了
14. warning passing argument 1 of 'fopen' from incompatible pointer type19. warning passing argument 1 of 'fopen' from incompatible pointer type
fopen() 我怎么看都没用错啊。
#include <stdio.h>
#include <stdlib.h>
int main(int argc,int *argv[])
{
FILE *fin,*fout;
char a[1000];
if(argc != 3)
{
printf("参数错误.\n");
exit(EXIT_FAILURE);
}
if((fin = fopen(argv[1],"rb")) == NULL)
{
printf("无法打开源文件.\n");
exit(EXIT_FAILURE);
}
if((fout = fopen(argv[2],"wb")) == NULL)
{
printf("无法打开目标文件.\n");
exit(EXIT_FAILURE);
}
while((fread(a,sizeof(char),1000,fin)) > 0)
fwrite(a,sizeof(char),1000,fout)
return 0;
}