📄 client.cpp
字号:
#include "Client.h"
Client::Client() {}
Client::Client (string &fname, string &lname, string &email, string &passwd)
:fname(fname),lname(lname),email(email),passwd(passwd) {}
Client::Client(const Client &c) {
this->fname = c.getFname();
this->lname = c.getLname();
this->email = c.getEmail();
this->passwd = c.getPasswd();
}
void Client::setFname(const string &fname) {
this->fname = fname;
}
void Client::setLname(const string &lname) {
this->lname = lname;
}
void Client::setEmail(const string &email) {
this->email = email;
}
void Client::setPasswd(const string &passwd) {
this->passwd = passwd;
}
string Client::getFname() const {
return this->fname;
}
string Client::getLname() const {
return this->lname;
}
string Client::getEmail() const {
return this->email;
}
string Client::getPasswd() const {
return this->passwd;
}
bool Client::verifyPasswd(string passwd) {
if(this->passwd == passwd)
return true;
return false;
}
istream &operator>>(istream &stream, Client &c) {
string fname,lname,email,passwd;
stream>>fname>>lname>>email>>passwd;
c.setFname(fname);
c.setLname(lname);
c.setEmail(email);
c.setPasswd(passwd);
return stream;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -