I've been currently learning c++ for a project of mine. At the moment, I am thinking about using a vector of pointers to a class (which I will fill with classes derived from this base class) because I want to access unique functions specific to every derived class. I am not entirely sure how to go about using it though, and from my experience with a normal vector, I understand how it can be a pain in the ass to get working, so I just want to know a couple of things:
How can I add an object to the vector?
How do I delete a single element in the vector?
How to I access a specific object through the iterator? For instance, how do I access the functions of an object that has a pointer in the vector?
How do I pass an iterator to a function that takes a pointer to an object as an argument?
Also is there anything else I should know?