class Base
{
public:
Base(){}
virtual void f() {};
}
class Derived : public Base
{
public:
Derived() {}
virtual void f() {}
}
int main()
{
Base *obj = new Derived();
obj->f();
return 0;
}
Well, this type of behaviour is called upcasting or downcasting?
What is upcasting and downcasting?