Hi everybody,

I have a program that encrypts a file ,by reading it 8-bit at a time, manipulating them and puting them into a temp file, when this is done, it copies the temp to the original file.

Now I've got three problems, at least...

First is how can I read a char, manipulate it and putting it back instead of the old char (that would surely save time)? I didn't figure out a way using-
" fstream File (File, ios:ut | ios::in | ios::binary) " (thought the then in+out would solve this).

Second is how can I detect an unexpected termination of the program (as in THE PROGRAM IS NOT RESPONDING, crtl+alt+del and so on....)? how can I roll back the changes that were made on the file if he was not fully encrypted / decrypted?

Third is what could I do for my program not to get stuck somewhere on the way when it's handeling "big files" (200mb and up)?


Thanks