0
我试图使用文件打开和写入文件方法来复制图像文件,但启用实现图像...所以请帮助我与代码一起需要头文件。如何将图像复制到C语言的目录
char ch, source_file[20], target_file[20];
FILE *source, *target;
source = fopen("Source", "r");
if(source == NULL)
{
printf("Press any key to exit...\n");
}
target = fopen("Destination", "w");
if(target == NULL)
{
fclose(source);
}
while((ch = fgetc(source)) != EOF)
fputc(ch, target);
printf("File copied successfully.\n");
fclose(source);
fclose(target);
我想这....
所以你的问题是什么? –
你应该开始代码,然后我们看看它。 – smushi
你需要'';你可以使用'fread()'和'fwrite()';你将使用'fopen()';您可能会在公开呼叫中使用'b'作为其中一个标志。 –