C++代码
来源:互联网 发布:淘宝店铺权重提升 编辑:程序博客网 时间:2024/06/09 14:40
#include<string.h>
#include<iostream>
using namespace std;
class fire
{
protected:
char name[20];
int age;
char sex;
char address[20];
long tel;
public:
fire()
{
strcpy(name,"fire");
age=18;
sex='m';
strcpy(address,"dd86749");
tel=2410421;
}
void print()
{
cout<<name<<","<<age<<","<<sex<<","<<address<<","<<tel<<endl;
}
};
class tiaotan: protected fire
{
protected:
char department[20];
float salay;
public:
tiaotan():fire()
{
strcpy(department,"Computer");
salay=2010.34f;
}
void print()
{
cout<<name<<","<<age<<","<<sex<<","<<address<<","<<tel;
cout<<","<<department<<","<<salay<<endl;
}
};
int main()
{
tiaotan zwj;
zwj.print();
}
- C代码
- c代码调用java代码
- 均值滤波代码 C代码
- C++/C代码审查表
- C++/C代码审查表
- extern "C"处理C代码
- C++/C代码审查表
- C++/C代码审查表
- 宽带拨号代码(C++, C#)
- [C++] 代码C风格缩进
- C/C++:VS2012使用C代码
- C++代码优化Tips
- C代码优化方案
- 可执行的c代码
- C代码优化方案
- 导出EXCEL代码(C#)
- Jmouse.JFiles 代码(C#)
- c/c++宏代码
- 解决linux没有在第一磁盘的引导扇区的问题
- Power Designer使用技巧
- 2010.12.12-C++枚举类型用途及定义详解
- Open Source SIP Stack and Media Links
- 社会工程攻击
- C++代码
- extjs textfield 获得焦点 focus
- 制作Linux的U盘启动介质
- 记录一个rewrite的写法
- 日志组状态:inactive/active/current
- FFMpeg框架代码阅读
- TIOBE 2010年12月编程语言排行榜:观察与评论
- IE工具栏背景图片更换
- IMDB TOP 250