-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoffee serve.cpp
70 lines (55 loc) · 853 Bytes
/
coffee serve.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include<iostream>
using namespace std;
#include<string>
#include<map>
struct guest
{
int room_No;
string name;
int friend_Room_No;
public:
void get();
};
class hotel
{
int num_Of_Guest;
map<int,guest> stay_Det;
int first_Room_No;
public:
void get();
void serve_Coffee();
};
void hotel::get()
{
cin>>num_Of_Guest;
struct guest Guest[num_Of_Guest];
for(int i=0;i<num_Of_Guest;i++)
{
cin>>Guest[i].room_No;
cin>>Guest[i].name;
cin>>Guest[i].friend_Room_No;
}
cin>>first_Room_No;
for(int i=0;i<num_Of_Guest;i++)
{
stay_Det.insert(pair<int,guest>(Guest[i].room_No,Guest[i]));
}
/* int itr=stay_Det.at(first_Room_No);
for(int i=0;i<num_Of_Guest;i++)
{
if(i!=itr)
{
// itr1 stay_Det.find()
}
}*/
}
void hotel::serve_Coffee()
{
cout<<"done";
}
main()
{
hotel h;
h.get();
h.serve_Coffee();
}