I'm a bit confused about this working on Windows with standard c++ lib.
Having this code:
std::fstream _fs;
_fs.open('file.txt', std::fstream::in | std::fstream::out | std::ios_base::ate);
and file.txt:
abcdefg
SUB
Being 'SUB' hex value 0x1A
After the open(), without any write() or close(), I found that file.txt is modified. I found this debugging the code and stopping it after the open().
file.txt is modified (modify date in file also) without the SUB value, I mean, the file.txt is now:
abcdefg
Is this correct? or am I doing something wrong with open() modes?
Hope anybody can point me on this.
Thanks!