-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb31.cpp
More file actions
57 lines (28 loc) · 728 Bytes
/
b31.cpp
File metadata and controls
57 lines (28 loc) · 728 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
54
55
56
57
#include<iostream>
#include<string>
using namespace std;
class Employee{
private: int a,b,c;
public: int d,e;
void setdata(int a1,int b1, int c1);
void getdata(){
cout<<"the value of a is "<<a<<endl;
cout<<"the value of b is "<<b<<endl;
cout<<"the value of c is "<<c<<endl;
cout<<"the value of d is "<<d<<endl;
cout<<"the value of e is "<<e<<endl;
}
void Employee :: setdata(int a1 ,int b1, int c1){
a=a1;
b=b1;
c=c1;
}
};
int main(){
Employee yash;
yash.d =34;
yash.e =50;
yash.setdata(1,2,4);
yash.getdata();
return 0;
}