Suppose I have a class ElementA that derives from Element and I want to
store all kinds of elements in this list. I suppose I have to store pointers
in the vector instead of the elements themselves?
When I loop through the vector and retrieving all elements (well, the
pointers) with the iterator, the program always comes back to the baseclass.
I declared the functions (and the destructor) as virtual, but it won't work.
Anything to look out for?
---
And how do you correctly delete elements from such a vector? Retrieve them,
delete them and then clear the vector?
--- stefkeB ---