Hi!
how can I add a byte to the end of a binary file? Let's say i want to add a 0xFF to it?
Also, any method to append a whole .bin file to another one?
(except : system(copy /b ....) )
Thanks in advance!
radu
Printable View
Hi!
how can I add a byte to the end of a binary file? Let's say i want to add a 0xFF to it?
Also, any method to append a whole .bin file to another one?
(except : system(copy /b ....) )
Thanks in advance!
radu
1. MFC CFile Class:
Open with CFile::modeWrite | CFile::modeNoTruncate, call CFile::SeekToEnd, and CFile::Write.
2. Using Win 32 API:
CreateFile, SetFilePointer, WriteFile
hi,
which platform and compiler you are using... ?
follow the steps
1) Open File using ............Open
2) seek to end of file (set file pointer to end of file),...... Seek()
3) write byte using.............. WriteFile()
Othere API and classes useful
Classs
CFile
API
CreateFile (),ReadFile,WriteFile , Seek...............
in C
fopen(),fread,fwrite.........
-Anant