#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#pragma warning (disable:4996)
int main()
{
FILE*p = fopen("1234.jpg", "rb");
if (NULL == p)
{
perror("");
return -1;
}
FILE*a = fopen("haha1234.jpg", "wb");
if (NULL == a)
{
perror("");
return -1;
}
while (1)
{
char ch = 0;
ch = fgetc(p);
if (feof(p))
{
break;
}
fputc(ch, a);
}
fclose(p);
fclose(a);
}