Consider the following code:
class Base
{
protected:
virtual void methodDefinedInBase() = 0;
}
Class Derived: private Base
{
public:
void someMethod();
protected:
virtual void methodDefinedInBase()
{
std::cout<<"From B"<<std::endl;
}
}
In the above code, I can create object of type "Derived". C++ allows me access to the method "methodDefinedInBase()" from "someMethod()" in Derived class. But, how do I create an object of type "Base" ?
Thanks,
Vishnu.