Hello all,

I have two different classes that are both inherited from the same parent class.
class BaseClass {...};
class childClass_1: public BaseClass {...};
class childClass_2: public Baseclass {...};

I have a vector that stores pointers to objects of the type BaseClass:
std::vector <BaseClass *> baseObjects;

now i want to be able to do something like this:
int i;
for (i=0;i<baseObjects.length();i++) {

baseObjects.at(i)->doSomething ();

}

however, the contents of the function doSomething is different for childClass_1 and childClass_2. how can i arrange this? some sort of function template in BaseClass?

Thanks in advance! I really appreciate it -
- iochi