Boost logo

Boost Users :

From: KSpam (keesling_spam_at_[hidden])
Date: 2007-12-27 11:44:41


On Thursday 27 December 2007 00:20:24 sjdf wrote:
> // Save
> std::ofstream ofs( "c.out" );
>
> A testA1;
> B testB1;
>
> testA1.Save( ofs );
> testB1.Save( ofs );
>
> ofs.close();
>
> // Load
> std::ifstream ifs( "c.out" );
>
> A testA11;
> B testB11;
>
> testA11.Load( ifs );
> testB11.Load( ifs );

The simple solution would be to create a "C" type that contains an "A" and
a "B". Then you could just save and load the C object.

Hope This Helps,
Justin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net