c++ - Writing to specific position in a file -


i have

fstream output; output.open(fname, ios::out | ios::trunc); //file (int i=0; i<flength; i++)     output.put('1'); 

i want overwrite different length of data different locations in file. data characters.

lets there 111111111111111111111111111111111, want write

11   111111333111!!!!!!1    11441111 

use seekp() set writing position in file stream.


Comments

Popular posts from this blog

c# - BasicHttpBinding equivalent CustomBinding using WCF Client and PHP WebService -

android - Cannot use ndk-build on Cygwin -

sql server - python to mssql encoding problem -