Let's say we have two classes Employee and Manager where Manager is derived from Employee. What is the difference between e2 and e3 (aside from one being a pointer)
Manager m;
Employee e2 = m;
Employee* e3 = &m;
I have noticed that if Manager overrides a virtual method print in Employee, then e2.print() invokes Employee::print whereas e3->print() invokes Manager::print() (i.e. polymorphism does not work without the pointer). But I'm not sure what exactly is happening here.