Link to home
Create AccountLog in
Avatar of hipal
hipalFlag for United States of America

asked on

writing vector of objects into a file

Hello,

I have 4 classes (let us say A, B, C and D). Other than regular instance variables
class A has vector<B> b;
class B has vector <C> c;
class C has vector <D> d;
class D has vector<String> e;

I want to store all these vectors in a text file.

Please suggest how to do that.
ASKER CERTIFIED SOLUTION
Avatar of a_b
a_b

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Avatar of Valeri
Valeri
Flag of Bulgaria image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
>>I want to store all these vectors in a text file.

Why would you want to store vectors of different types in one text file?