Hi,
I'm trying to read from a file and then based on certain conditions filtering it into another file.But what i get in the file and the console are some unreadable characters.Could anyone tell me where am i going wrong? My code is this :
Thanks,
Saurabh
I'm trying to read from a file and then based on certain conditions filtering it into another file.But what i get in the file and the console are some unreadable characters.Could anyone tell me where am i going wrong? My code is this :
Code:
char c[100];
FILE *fpt, *reqfpt;
fpt = fopen("Header.dat","r");
reqfpt = fopen("wrResult.dat","w");
while(c[i]=getc(fpt)!='\r')
{
printf("%c",c[i]);
i++;
}
Thanks,
Saurabh