⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user.cpp

📁 近日做C++课程设计时写的一个民航订票系统
💻 CPP
字号:
#include "string.h"
#include "iostream.h"
#include "iomanip.h"

#include "User.h"

CUser::CUser()
{

}

CUser::~CUser()
{

}

char * CUser::GetUserID()
{
	return userID;
}

char * CUser::GetPassword()
{
	return password;
}

int CUser::GetPopedom()
{
	return popedom;
}
void CUser::SetUserID(char *ID)
{
	strcpy(userID, ID);
}

void CUser::SetPassword(char *psd)
{
	strcpy(password, psd);
}

void CUser::SetPopedom(int pdm)
{
	popedom = pdm;
}

CUser CUser::operator=(const CUser &right)
{
	strcpy(userID, right.userID);
	strcpy(password, right.password);
	popedom = right.popedom;
	return *this;
}

CUser::CUser(const CUser &right)
{
	strcpy(userID, right.userID);
	strcpy(password, right.password);
	popedom = right.popedom;
}

void CUser::Show()
{
	cout<<"╔--------------------------------------------------------╗\n";
	cout<<"  |"<<"用户名"<<"|"<<"用户密码"<<"用户权限"<<"|"<<endl;
	cout<<"  |"<<setw(6)<<userID<<"|"<<setw(8)<<password<<"|"<<setw(8)<<popedom<<"|"<<endl;
	cout<<"╚--------------------------------------------------------╝\n";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -