|
发表于 2013-6-9 14:17:57
|
显示全部楼层
小甲鱼 发表于 2011-6-4 12:41
查查会不会让杀毒软件和谐了。代码没错。
#include <stdio.h>
#include <stdlib.h>
void main()
{
FILE *f_file, *f_pic, *f_finish;
char ch, pic_name[20], file_name[20], finish_name[20];
printf("Please enter in the name of the pictures, documents to synthesis: \n");
printf("pictures: ");
scanf("%s", pic_name);
printf("document: ");
scanf("%s", file_name);
printf("finish: ");
scanf("%s", finish_name);
if( !(f_pic = fopen(pic_name, "rb")))
{
printf("Cannot open the ficture %s!\n", pic_name);
exit(0); /*终止程序 */
}
if( !(f_file = fopen(file_name, "rb")))
{
printf("Cannot open the file %s!\n", file_name);
exit(0); /*终止程序 */
}
if( !(f_finish = fopen(finish_name, "wb")))
{
printf("Cannot open the file %s!\n", finish_name);
exit(0); /* 终止程序 */
}
while( !feof(f_pic) )
{
ch = fgetc(f_pic);
fputc(ch, f_finish);
}
fclose(f_pic);
while( !feof(f_file) )
{
ch = fgetc(f_file);
fputc(ch, f_finish);
}
fclose(f_file);
fclose(f_finish);
}
这是图片合成器的代码,但是我照视频上那样弄了,但是就是没办法生成。
|
|