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