-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_objest3.cpp
40 lines (35 loc) · 947 Bytes
/
class_objest3.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
#include <iostream>
#include <list>
using namespace std;
class collage {
public:
string name;
string id;
string address;
string city;
int madeinyear;
int depertments;
list<string>cources;
};
int main()
{
collage clg;
clg.name = "Sagar institute of science and technology ";
clg.id ="238SISTEC";
clg.address="Gandhi nagar, Airport road ";
clg.city ="Bhopal";
clg.madeinyear =2011;
clg.depertments = 5;
clg.cources ={"CSE","AIDS","EX","EC","ME","CIVIL","CYBER SCURITY"};
cout<<"name = "<< clg.name <<endl;
cout<<"id = "<< clg.id <<endl;
cout<<"address = "<< clg.address <<endl;
cout<<"city = "<< clg.city <<endl;
cout<<"madeinyear = "<< clg.madeinyear <<endl;
cout<<"depertments= "<< clg.depertments <<endl;
cout<<"branch =";
for(string branch :clg.cources)
{
cout<<branch<<endl;
}
}