How to omit a header?

Discussion in 'C Programming' started by RB, Jul 1, 2003.

  1. RB

    RB Guest

    What is the best way to omit a header (44 bytes length) from a binary file?

    Thanks in advance,
    RB, Jul 1, 2003
    1. Advertisements

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

    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:
    C++ Faq:
    C Faq:
    alt.comp.lang.learn.c-c++ faq:
    Other sites: -- C++ STL Library book
    Thomas Matthews, Jul 1, 2003
    1. Advertisements

Ask a Question

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 (here). After that, you can post your question and our members will help you out.