Im trying to read from a file and then shift it by +1 and write to the same file again.Code:/*very very simple encrytion*/ fp=fopen("message.txt","r+"); do { c=fgetc(fp); xy=(c+1)%256; fputc(xy, fp); }while(c!=EOF); fclose(fp);
but it wont work. I donīt get any error.
example: message.txt
hello what is your name bla bla bla
I get:
an empty file![]()



LinkBack URL
About LinkBacks




