Hello People,
I just came across this code as I was browsing through some C++ problem sets. This code gives compile time error but I am unable to understand the reason. I am C guy and my knowledge about C++ is not that great. So pardon if there is an obvious solution to this problem. Any help would be appreciated
class Base
{
public:
Base();
virtual ~Base();
};
class derived: public Base
{
public:
virtual ~derived();
};
int main()
{
Base *pb = new derived;
getch();
}