|
-
September 30th, 2005, 06:12 AM
#1
stl structure which is suitable for inheritence
hi,
I have searched around this forum for an stl structure which is good for classes which inherits from another class.
I am no doubt a beginner at c++ so pardon if this has been asked a lot of time.
I learnt that if I use Vector<Person> stor;
and i use: stor.push_back(teacher);
I would lose the methods that teacher has, when I extract the object from the vector using Iterator. The original object has been sliced.
Any suggestion, help and ideas are greatly appreciated. I have done a lot of searching and I still don't understand.
Thank you for your help and consideration in advance.
regards,
Arvy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|