Untitled

mail@pastecode.io avatar
unknown
plain_text
12 days ago
383 B
3
Indexable
Never
#include <iostream>
using namespace std;

class B{
protected:
int m;
public:
    B(int value): m(value){
        cout <<"How are you"<<endl;
    }
};
class D: public B{
    protected:
    int n;
    public:
        D(int value, int value2):B(value),n(value2){
            cout<<"It's great today"<<endl;
        }
};
int main(){
    D d1(10,20);
    return 0;
}
Leave a Comment