Binary files

This is a discussion on Binary files within the C Programming forums, part of the General Programming Boards category; Are there any good tutorials which go over everything on binary files. I want to: 1) Know how they work, ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220

    Binary files

    Are there any good tutorials which go over everything on binary files.

    I want to:
    1) Know how they work, all this byte crap
    2) Be able to read them
    3) Be able to write to them.
    4) Be able to randomly access them

    Point me to some tutorials or give me some of your own tips, please.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    18
    I wrote a basic tutorial on Hex and Binary not too long ago...
    http://cyber.homeunix.net/pdf/comput...ex-dec-bin.pdf
    hope that helps ^_^
    HACKERS MANIFESTO (NOTE MOST WAS CUT OFF) (PEOPLE SAID IT WAS TOO LONG)
    This is our world now... the world of the electron and the switch, the beauty of the baud.
    We make use of a service already existing withoutpaying for what could be dirt-cheap if it wasn't run by profiteering gluttons, and you call us criminals.
    We explore... and you call us criminals.
    We seek after knowledge... and you call us criminals.
    We exist without skin color, without nationality, without religious bias... and you call us criminals.
    You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it's for our own good, yet we're the criminals.

    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.

    I am a hacker, and this is my manifesto. You may stop this individual,but you can't stop us all... after all, we're all alike.
    +++The Mentor+++

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    >1) Know how they work, all this byte crap

    A binary file is just a collection of bytes put into a file. Ofcourse they are structured some way, but if you don't know the structure, it's just bytes.

    >2) Be able to read them
    >3) Be able to write to them.

    Open the file with fopen. Use "rb" for read-only or "rb+" for update (read/write).

    4) Be able to randomly access them

    Replace the file pointer with fseek. You can store the current position with ftell.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 10:46 AM
  2. send/recv binary files using sockets in C++
    By dafatdude in forum Networking/Device Communication
    Replies: 14
    Last Post: 07-25-2004, 11:00 AM
  3. MFC: CStrings & binary files question(s)
    By BrianK in forum Windows Programming
    Replies: 0
    Last Post: 06-24-2004, 05:41 PM
  4. storing string objects to binary files
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 10-06-2001, 11:33 PM
  5. Binary files in C++
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 09-25-2001, 04:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21