Except for the fact that it can be called from the derived class overridden method, the pure virtual function doesnot seem to be able to be called anywhere! What then, is the use of its body? Eg.
class base
{
public:
virtual void fun()=0
{
cout<<"I have been called from derived class"<<endl;
}
};
class derived:public base
{
public:
void fun()
{
cout<<"I am the derived class"<<endl;
base::fun();
}
};
void main()
{
derived d;
d.fun();
}