• Advertisement
Sign in to follow this  

copy bmp file

This topic is 3670 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how to copy a bmp file byte by byte to a another file through a code in c++ so that the new file created is a exact copy of earlier one thanks

Share this post


Link to post
Share on other sites
Advertisement
The keyword is probably "binary mode".

You open the source file and the target file in binary mode.

Read a chunk.
Write the read number bytes.
Repeat until you can't read any more bytes.
Close both files.


The chunk size may vary, 64 KB is a handy measure.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement