Thread: input/output + Object Files ?

  1. #1

    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


  2. #2
    Registered User Strider's Avatar
    Join Date
    Aug 2001
    Take a look at reading/writing binary to/from a file using ifstream and ofstream. Here is a simple tutorial:

    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
    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...

    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, 09:04 AM
  4. Can't define object in seperate files
    By cbranje in forum C++ Programming
    Replies: 1
    Last Post: 11-11-2004, 11:17 AM
  5. HELP: linking several object files
    By fe344 in forum C Programming
    Replies: 4
    Last Post: 10-23-2002, 10:31 AM