-
Notifications
You must be signed in to change notification settings - Fork 0
/
file.cpp
54 lines (40 loc) · 811 Bytes
/
file.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <string>
using namespace std;
/*
CAMBI0
*/
class B{
public:
std::string pub ;
B(string p1="PUB",string p2="PRI",string p3="PRO"):pub(p1),pri(p2),pro(p3){};
std::string rpub(){return pub; };
std::string rpri(){return pri; };
std::string rpro(){return pro; };
private:
std::string pri ;
protected:
std::string pro ;
};
class D: public B{
public :
std::string diff;
/*
D(string p1="dPUB",string p2="dPRI",string p3="dPRO"):pub(p1),pri(p2),pro(p3){};
std::string rpub(){return pub; };
std::string rpri(){return pri; };
std::string rpro(){return pro; };
private:
std::string pri ;
protected:
std::string pro ;
*/
};
int main() {
D d;
cout<<d.rpub();
cout<<d.rpri();
cout<<d.rpro();
cout<<endl;
return 0;
}