Byte location

This is a discussion on Byte location within the C++ Programming forums, part of the General Programming Boards category; How would I go about locating a certain byte in a file and saving it to another file? Like for ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    9

    Question Byte location

    How would I go about locating a certain byte in a file and saving it to another file? Like for instance, locating byte number 100 and capturing the data from byte 101 to byte 200 to another file?

    I am just learning and could use all the advice I can get.

    Thank you,

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,823
    The thing you need is seekp / seekg
    But I dont know C++
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 06:49 PM
  2. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 04:42 PM
  3. Need some help regarding data structures
    By Afrinux in forum C Programming
    Replies: 15
    Last Post: 01-28-2006, 05:19 AM
  4. error: identifier "byte" is undefined.
    By Hulag in forum C++ Programming
    Replies: 4
    Last Post: 12-10-2003, 05:46 PM
  5. pointerz
    By xlordt in forum C Programming
    Replies: 6
    Last Post: 01-11-2002, 08:31 PM

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