Reputation:
Is it necessary to initialize ;
- vector<string>
- vector<string*>
in constructor ?
Upvotes: 1
Views: 550
Reputation: 91270
No. Default initialization will be fine.
For vector<string *>
you will however need a destructor, a copy constructor and an assignment operator in order to properly delete/copy the string *
elements in your vector<string *>
member variable.
Upvotes: 6