I have a base class with a virtual function that i define within the base class as well as the derived class in main I have the following code:
Attack() is the function I define in all three classes how do I get it to call the function in the class it references.Code:int main() { Player *A = &Human class; //Human is derived from Player Player *B = &Computer class; //Computer is derived from Player A->Attack(); B->Attack(); return 0; }