Untitled
Anonymous
plain_text
07/11/2024 12:33 PM
512 B
22
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