home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16253 < prev    next >
Encoding:
Text File  |  1992-11-14  |  1.4 KB  |  36 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!ukma!rsg1.er.usgs.gov!darwin.sura.net!uvaarpa!liberty!duvalld
  3. From: duvalld@liberty.uc.wlu.edu (Danek Duvall)
  4. Subject: Serializing Multiple Objects
  5. Message-ID: <1992Nov13.205331.26875@liberty.uc.wlu.edu>
  6. Date: Fri, 13 Nov 1992 20:53:31 GMT
  7. Distribution: local,world
  8. Organization: Washington & Lee University
  9. X-Newsreader: Tin 1.1 PL5
  10. Lines: 24
  11.  
  12.  
  13. I have been slowly learning C++ in my spare time with MSC/C++7.0.
  14. Everything has been going OK, but I ran into an interesting problem when
  15. using the serialization properties. I wanted (as a test) to create three
  16. objects and serialize them to a file inside of a for loop. It serialized
  17. something, but always only the first of the objects get serialized and
  18. then later read back in. Funny thing is, I looked at the file, and among a
  19. little binary garbage, there was only the text for that first object...but
  20. only once!  My question is, why would it, given three serialize commands,
  21. only serialize once, and then, given three deserialize commands,
  22. deserialize the same object three times without ever returning an error or
  23. throwing an exception? Is this at all possible? Do I need to create a list
  24. for these objects and then serialize one list? (I am going to have to
  25. anyway, but I'd like to know.)
  26.  
  27. Thanks
  28.  
  29. Danek
  30.  
  31.  
  32. -- 
  33. Danek Duvall: Washington and Lee U.
  34. Internet: duvalld@liberty.uc.wlu.edu
  35. ***
  36.