I got the whole static binding and dynamic binding on runtime if a function is declared virtual in the base class, but if you do something like this...
class base
{
public:
void print()
{
cout << "base" << endl;
}
};
class derived : public base
{
public:
void print()
{
cout << "derived" << endl;
}
};
a derived obj print function still prints "derived" like you would assume. So even if the print function was declared virtual in the base class, it would not change anything in this scenario. So what exactly is up? Thanks