第十一周实践项目7————职员有薪水了

问题及代码:

/*copyright(c)2016.烟台大学计算机学院
 * All rights reserved,
 * 文件名称:text.Cpp
 * 作者:吴敬超
 * 完成日期:2016年5月9日
 * 版本号:codeblock
 *
 * 问题描述:  职员有薪水了
 * 输入描述:
 * 程序输出: 输出结果
 */
#include 
#include 
#include 

using namespace std;
class CPerson
{
protected:
    string m_szName;
    string m_szId;
    int m_nSex;//0:women,1:man
    int m_nAge;
public:
    CPerson(string name,string id,int sex,int age);
    void Show1();
    ~CPerson();
};
CPerson::CPerson(string name,string id,int sex,int age):m_szName(name),m_szId(id),m_nSex(sex),m_nAge(age){}
void CPerson::Show1()
{
    cout<>name>>id>>sex>>age>>department>>salary;
    CEmployee employee1(name,id,sex,age,department,salary);
    employee1.Show2();
    return 0;
}
运行结果:
第十一周实践项目7————职员有薪水了_第1张图片

你可能感兴趣的:(C/C++)