错误
来源:互联网 发布:网络彩票诈骗2017 编辑:程序博客网 时间:2024/05/18 01:13
#include <iostream>
#include <cstring>
#include <string>
using namespace std;
class person
{
public:
person(string s,int a,char c)
{
name=s;
age=a;
sex=c;
}
void show()
{
cout<<"name:"<<name<<endl;
cout<<"age:"<<age<<endl;
cout<<"sex:"<<sex<<endl;
}
protected:
string name;
char sex;
int age;
};
class employee: public person
{
public:
employee(int x=0,int y=0)
{
bs=x;
ld=y;
}
void show1()
{ show();
cout<<"basicSalary:"<<bs<<endl;
cout<<"leavedays:"<<ld<<endl;
}
protected:
int bs,ld;
};
int main()
{
int a1,bs1,ld1;
string n1;
char c1;
cin>>n1>>c1>>a1>>bs1>>ld1;
person p1(n1,a1,c1);
employee e1(n1,a1,c1,bs1,ld1);
e1.show1();
return 0;
}
- 错误?
- 错误
- 错误
- 错误
- 错误
- 错误:
- 错误
- 错误
- 错误
- 错误,
- 错误。。。
- 错误
- 错误!!!!!
- 错误
- 错误
- 错误
- 错误
- 错误
- 堆排序
- 集群(cluster)原理
- jquery中获取兄弟元素的方法
- 从函数或方法返回一个内存地址
- java enum(枚举)使用详解
- 错误
- Ajax+SpringMVC+Spring+Mybatis+MySql+js用户注册实例
- ElasticSearch使用过程中遇到的问题
- Chrome浏览器扩展开发系列之十三:消息传递Message
- mybatis集成spring的事务管理
- android选取照片后做处理
- Codeforces Round #381 (Div. 2) C. Alyona and mex(思维)
- 加班多无聊过来看看,只有程序员才懂的幽默
- js--变量的复制与函数参数的传递