Simple Question about Print Function.

Apr 6, 2017 at 1:05am
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.
Last edited on Apr 6, 2017 at 1:07am
Apr 6, 2017 at 1:08am
why don't you just try it and see?
Topic archived. No new replies allowed.