direct file access is driving me mad!

This is a discussion on direct file access is driving me mad! within the C++ Programming forums, part of the General Programming Boards category; Does anyone have a nice little algorithm for storing and loading stuff from a file using direct file i/o in ...

  1. #1
    cerial-killer
    Guest

    Question direct file access is driving me mad!

    Does anyone have a nice little algorithm for storing and loading stuff from a file using direct file i/o in Microsoft Visual C++.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    What kind of algorithm? You have to be more specific.
    If you know the offset, use seekg() to go there, for example if you want the tenth object of the type OBJECT, use seekg((10 - 1) * sizeof(OBJECT), ios::beg).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  2. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-22-2008, 12:19 AM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM

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