-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmenu.cpp
More file actions
32 lines (29 loc) · 687 Bytes
/
menu.cpp
File metadata and controls
32 lines (29 loc) · 687 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
#include "card.h"
card::card(string pname,string pTelephoneNumber)
{
name=pname;
TelephoneNumber=pTelephoneNumber;
}
void card::setname(string name_)
{
name=name_;
}
void card::setTelephoneNumber(string TelephoneNumber_)
{
TelephoneNumber=TelephoneNumber_;
}
string card::getname() { return name; }
string card::getTelephoneNumber() { return TelephoneNumber; }
ostream & operator<<(ostream & output, card & A)
{
output<<A.name<<" ";
output<<A.TelephoneNumber<<" ";
return output;
}
istream & operator>>(istream & input,card & A)
{
cout<<"please input the name and telephone:"<<endl;
input>>A.name;
input>>A.TelephoneNumber;
return input;
}