I have a need to add the total of one of the variables for each of the derived classes I have.
I think this has something to do with dynamic_cast?
class raceCar : public Base
class crapCar : public Base
// Create some raceCars and crapCars
int raceCarTotalTime = 0;
int crapCarTotalTime = 0;
if(carList[i] == raceCar)
raceCarTotalTime += carList[i]->getTime();
crapCarTotalTime += carList[i]->getTime();