input/output + Object Files ?

This is a discussion on input/output + Object Files ? within the C++ Programming forums, part of the General Programming Boards category; Hello all, Does any one know if it's possible in C++ to read in from and write to Object files ...

  1. #1
    Unregistered
    Guest

    Question input/output + Object Files ?

    Hello all,

    Does any one know if it's possible in C++ to read in from and write to Object files like you can in Java.

    For example if I wanted to save a linked list of Objects to a file which could then be easily read back in next time the program is run ?



    Thanks in advance

    L

  2. #2
    Registered User Strider's Avatar
    Join Date
    Aug 2001
    Posts
    149
    Take a look at reading/writing binary to/from a file using ifstream and ofstream. Here is a simple tutorial: http://courses.cs.vt.edu/~cs2604/fall01/binio.html

    David
    One Ring to rule them all, One Ring to find them,
    One Ring to bring them all and in the darkness bind them
    In the Land of Mordor where the Shadows lie.

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    why would you want to write object files when...

    1.) the compiler does it for you... and
    2.) the linker links them for you...

    there would be much to learn if you were to go about making those! if you mean to say just files which organized data objects, [which is what i think you did, since david responded in that tact], then using streams and f* functions in <stdio.h> will do you nicely...

    -hth
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. using this as synchronization object
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 03-22-2008, 07:49 AM
  2. synchronization object choosing
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 03-22-2008, 04:33 AM
  3. Help with input/output files
    By aldin176 in forum C++ Programming
    Replies: 5
    Last Post: 11-06-2006, 08:04 AM
  4. Can't define object in seperate files
    By cbranje in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2004, 10:17 AM
  5. HELP: linking several object files
    By fe344 in forum C Programming
    Replies: 4
    Last Post: 10-23-2002, 10:31 AM

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