Code:
CODE
int main(void)
{
int a;
FILE * FROM = fopen("C:\\test.exe","r");
FILE * TO = fopen("C:\\result.exe","w");
while((a = fgetc(FROM))!= EOF)
{
fputc(a,TO);
}
........ // close files etc
}
{
int a;
FILE * FROM = fopen("C:\\test.exe","r");
FILE * TO = fopen("C:\\result.exe","w");
while((a = fgetc(FROM))!= EOF)
{
fputc(a,TO);
}
........ // close files etc
}
i get an error saying result.exe is not a valid application
i've already written this program in python, java, and even C# if i remember correctly but i thought i had already solved this problem in C, maybe i forgot how. anyway thanks to those of you who are going to help.

