📄 persontypeimp.cpp
字号:
#include <iostream>
#include <string>
#include "personType.h"
using namespace std;
void personType::setName(string first, string last)
{
cout<<"See Programming Exercise 11"<<endl;
}
void personType::getName(string& first, string& last)
{
cout<<"See Programming Exercise 11"<<endl;
}
//constructor
personType::personType(string first, string last)
{
cout<<"See Programming Exercise 11"<<endl;
}
const personType& personType::operator=(const personType& right)
{
cout<<"See Programming Exercise 11"<<endl;
return *this;
}
bool personType::operator==(const personType& right) const
{
return(firstName == right.firstName
&& lastName == right.lastName);
}
bool personType::operator!=(const personType& right) const
{
cout<<"See Programming Exercise 11"<<endl;
return false;
}
bool personType::operator<=(const personType& right) const
{
cout<<"See Programming Exercise 11"<<endl;
return false;
}
bool personType::operator<(const personType& right) const
{
cout<<"See Programming Exercise 11"<<endl;
return false;
}
bool personType::operator>=(const personType& right) const
{
cout<<"See Programming Exercise 11"<<endl;
return false;
}
bool personType::operator>(const personType& right) const
{
cout<<"See Programming Exercise 11"<<endl;
return false;
}
istream& operator>>(istream& is, personType& pName)
{
is>>pName.firstName>>pName.lastName;
return is;
}
ostream& operator<<(ostream& os, const personType& pName)
{
cout<<"See Programming Exercise 11"<<endl;
return os;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -