Untitled

 avatar
unknown
plain_text
a year ago
383 B
6
Indexable
#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;
}
Editor is loading...
Leave a Comment