B
bob
Is there a way to overwrite a random byte in a file using FILE without
rewriting the whole file?
rewriting the whole file?
Is there a way to overwrite a random byte in a file using FILE without
rewriting the whole file?
Kern said:But it's quite classic way to moditfy the binary file.
How can we do this in a modern cpp way?
The modern cpp way would be the use of fstream;
std:fstream myFile; // or fstream for both writing and reading
myFile.open( "filename", std::ios_base::binary | std::ios_base:ut );
now with seekg method you can place the write cursor to modify your
desired byte.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.