c语言复制二进制文件

        FILE *sf, *df;
	sf = fopen("G://Jellyfish.jpg", "rb");
	df = fopen("G://Jellyfish1.jpg", "wb");
	char ch[8];
	while(!feof(sf)) {
		fread(ch, sizeof(char), 8, sf);
		fwrite(ch, sizeof(char), 8, df);
	}
	fclose(sf);
	fclose(df);

 

你可能感兴趣的:(C语言)