Win API file problem
The following section of code is in my encryption programme that I am developing.
If the file doesn't exist, there is no problem with writing the character string to the file.
However, if I am overwriting the file, I cannot write the character string to the file. Just a blank file is produced.
if(MessageBox(hwnd, "File Already Exists, Overwrite?","warning", MB_YESNO|MB_ICONQUESTION)==IDYES)
CiphertextF.open(cipherfilename, ios::out | ios::trunc);
....more code that is exectuted whether or not the file exists,
....including create ciphertext
any help would be much appreciated.
Somebody must have an idea of what I am doing wrong???