Hi,
Let's say I have an stl vector containing class type "xx". xx is abstract. I have run into the issue where the compiler won't let me "instantiate" when i do something like the following:
std::vector<xx> victor;
void pusher(xx& thing)
{
victor.push_back(thing);
}
void main()
{
;
}
I assume this is because the copy constructor must be called. I have gotten around this issue by storing xx*'s in the vector rather than xx's. Is there a better solution? What is it?