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

📄 ep.cpp

📁 员工管理系统
💻 CPP
字号:
////////////////////cp.cpp
///////////////////类实现
#include<iostream.h>
#include"employee.h"
#include<string.h>
int employee::no=1001;
employee::employee()
{
	char sexstr[5];
	char namestr[20];
	char addstr[40];
	char citystr[10];
	char zipstr[6];
    epnum=no++;
	cout<<"员工编号为:"<<epnum<<"\n";
	cout<<"请输入员工性别: ";
	cin>>sexstr;
	p_line[0]=new char[strlen(sexstr)+1];
	strcpy(p_line[0],sexstr);
	cout<<"请输入员工姓名: ";
	cin>>namestr;
	p_line[1]=new char[strlen(namestr)+1];
	strcpy(p_line[1],namestr);
	cout<<"请输入员工住址: ";
	cin>>addstr;
	p_line[2]=new char[strlen(addstr)+1];
	strcpy(p_line[2],addstr);
	cout<<"请输入员工所在城市: ";
	cin>>citystr;
	p_line[3]=new char[strlen(citystr)+1];
	strcpy(p_line[3],citystr);
	cout<<"请输入员工邮编号码: ";
	cin>>zipstr;
	p_line[4]=new char[strlen(zipstr)+1];
	strcpy(p_line[4],zipstr);
    
	cout<<"该名员工信息输入完毕!  请输入下一名员工信息\n";
}

employee::~employee()
{}
/*//////////////////////////////
void employee::change()
{
	employee pt;
	delete []pt;
    
	cout<<"该名员工信息修改完毕!\n";
}

///////////////////////////////////////////*/
void employee::display()
{

	cout<<"员工编号: "<<epnum<<"\n";
	cout<<"员工性别: "<<p_line[0]<<"  员工姓名: "<<p_line[1]<<"  员工住址:  "<<p_line[2]<<"  员工所在城市: "<<p_line[3]<<"  员工邮政编码: "<<p_line[4]<<"\n";
	
	cout<<"---------------------------------------------------------------------------\n";
}

⌨️ 快捷键说明

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