I have base class Employee and a derived class Manager. If I put two print functions in each class then Which one it would use if I change Manager object M to Employee by static_cast<Employee>(M). And then I try to execute a statement: static_cast<Employee>(M).printSalary(). Which print function it will use?
Remember I have already introduced Print function for each of the Classes.