#include <iostream>
using namespace std;
class base
{
    public:
    void dis()
    {
        cout<<"Inherited by Derived class"<<endl;
    }
};
class derived : public base
{
    public:
    void end()
    {
        cout<<"Program Ended..."<<endl;
    }
};
int main()
{   derived obj;
    obj.dis();
    obj.end();
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: