I had a problem with some program I wrote that edit specific values within a specific file.
When I saved the values, using fstream's write() function, everything between these values became null.
I've looked again in the I/O tutorial - http://www.cplusplus.com/doc/tutorial/files/
and saw that they use memory block at the read()/write() example.
I also saw that they are using it at the example in the description about the write() function - http://www.cplusplus.com/reference/iostream/ostream/write/
I open the file and write to it directly. For example:
ofstream saveFile(saveFilePath, ios::binary); saveFile.seekp(a, ios::beg); saveFile.write(x,y); saveFile.seekp(b, ios::beg); saveFile.write(w,x); //...
Does my code null everything between the values I write to the file because I directly write it on the opened file and doesn't use a buffer like in the examples?