#include <iostream>
using namespace std;

// base class
class vechicle {
public:
    string brand = "ford";
    void honk() {
        cout<< "welcome in\n";
    }
};

// derived class
class car : public vechicle {
public:
    string model = "musthang";
};

int main() {
    car mycar;
    mycar.honk();
    cout<< mycar.brand + " " +  mycar.model;
    return 0;
}

Embed on website

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