as this example,
question:
If my purpose is initialize data from xml files and store them in the
vector, so they can be used in class B by other member functions, do
you think functionP is a viable function(will a could go away after
out of the function)?
If not, is there a better solution than using functionPt?
I read that it is not a good design to have container for pointers(C++
FAQs), but I cannot see how I can get around it in my situation.
Newbie questions, thanks for the help
Chris
class A{
....
}
class B{
void functionPt(){
...
A* aPt ;
vPt.push_back(aPt);
}
void functionP(){
...
A a;
v.push_back(a);
}
private:
vector<A*vPt;
vector<A v;
}