-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiple.cpp
More file actions
53 lines (41 loc) · 822 Bytes
/
multiple.cpp
File metadata and controls
53 lines (41 loc) · 822 Bytes
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
#include<iostream>
using namespace std;
// this is the parent class
class Instagram
{
public:
int follower;
int post;
void Reels()
{
cout<<"Bhai kitni reels dekha ga: "<<endl;
}
};
// this is the another class which created , for class person in case of multiple inheritance
class Facebook
{
public:
int following;
string Gf;
void video()
{
cout<<"Bhai facebook mai woh maja nhi: "<<endl;
}
};
// this is the child class and it inherit the property of class instagram and facebook at a time
class person: public Instagram , public Facebook
{
public:
int posts;
void Post()
{
cout<<"Bhai mai toh bs post dekhta hu , reels nhi: "<<endl;
}
};
int main()
{
person p1;
p1.Post();
p1.video();
p1.Reels();
}