File I/O

This is a discussion on File I/O within the C++ Programming forums, part of the General Programming Boards category; Hello ~ I'm creating a DLL that (basically) reads and writes ID3 data from MP3s. How can I, using the ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    32

    File I/O

    Hello ~

    I'm creating a DLL that (basically) reads and writes ID3 data from MP3s. How can I, using the Standard Library (or fstream.h), read exactly 30 bytes, then another lump of data of specific size etc etc, while incrementing the file handle each time? (it might do this automatically, I don't know). I've only done text files before, and I don't know how to read actually bytes of data. Would arrays help here?

    Thanks ~

    Chris Howarth

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,401
    Yes, you can use <fstream> from the standard library to read ID3 tags from MP3 files. After all, MP3 files are just files with binary data. The member functions seekg() and get() may come in handy, and remember to read in binary mode.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    32
    Oh yes, thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  3. 2 questions surrounding an I/O file
    By Guti14 in forum C Programming
    Replies: 2
    Last Post: 08-30-2004, 11:21 PM
  4. File I/O problems!!! Help!!!
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 05-17-2002, 08:09 PM
  5. advice on file i/o
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-29-2001, 04:56 AM

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