if (tstObj[0]->ProcessInputCmd(&inputCmd_ptr[0][0]))
{
//do something
} else if (tstObj[1]->ProcessInputCmd(&inputCmd_ptr[0][0]))
{
//do something
}
}
My code is working. No issues with that. My question is: is there any flaw in the way i created the array of ptr to a class inside its own member function to achieve runtime polymorphism? Anything wrong with this logically?