vc-study-2
来源:互联网 发布:手机淘宝改好评链接 编辑:程序博客网 时间:2024/05/22 16:58
//仅仅只是C++简单代码的编写
#include <iostream.h>
class animal
{
public:
animal()
{
cout<<"animal construct"<<endl;
}
~animal()
{
cout<<"animal 析构函数"<<endl;
}
void eat()
{
cout<<"animal eat"<<endl;
}
void sleep()
{
cout<<"animal sleep"<<endl;
}
void breathe()
{
cout<<"animal breathe"<<endl;
}
};
class fish : public animal
{
public:
fish()
{
cout<<"fish construct"<<endl;
}
~fish()
{
cout<<"fish 析构函数"<<endl;
}
void breathe()
{
cout<<"fish breathe"<endl;
}
};
void main()
{
animal an;
an.breathe();
fish fh;
fh.breathe();
}
- vc-study-2
- VC study
- VC++ study websites
- vc-study-1
- vc-study-3
- vc-study-4
- vc-study-5
- vc-study-6
- vc-study-7
- vc-study-8
- My study of VC++ ( Paint refered )
- C/C++/VC MFC----char & int---study
- VBA Study(2)
- Study EJB (2)
- Log4j Study(2)
- OpenGL Study 2
- lucene study notes (2)
- awk study(2)
- VC6.0
- 显示硬盘个数
- 最近开始学C++,初学者,呵呵
- vc-study-1
- 五种语言常见语言特征
- vc-study-2
- 算法的力量(转)
- vc-study-3
- vc-study-4
- vc-study-5
- vc-study-6
- vc-study-7
- 用c++函数结构计算时间差
- 经典查询