By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,376 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,376 IT Pros & Developers. It's quick & easy.

How to omit a header?

P: n/a
RB
What is the best way to omit a header (44 bytes length) from a binary file?

Thanks in advance,
Rita
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
RB wrote:
What is the best way to omit a header (44 bytes length) from a binary file?

Thanks in advance,
Rita


Proper method:
Copy the entire file, less the header to a new file.
Remove the old file.

Alternative:
Copy the 45th byte and on up to the start of the file,
thus overwriting the original data in the file. This
will not shrink the file at the end.

Another alternative:
Read and ignore the header.
Or just seek past it.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.