文件名称:vehicle
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:538byte
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
定义一个车(vehicle)基类,具有MaxSpeed,Weight等成员变量,Run,Stop等成员函数,由此派生出自行车(bicycle)类,汽车(motorcar)类。自行车(bicycle)类有高度(Height)等属性,汽车(motorcar)类有座位属性,从bicycle和motorcar类派生出摩托车(motorcycle)类,在继承过程中,注意把vehicle设置成为基类。如果不把vehicle设置为虚基类,会有什么问题?编程试试看。-The definition of a car (vehicle) base class, with MaxSpeed, Weight and other member variables, Run, Stop and other member functions, thus derived a bike (bicycle), automobiles (motorcar) class. Bike (bicycle) class has a high degree of (Height) and other property, automobiles (motorcar) class has a seat attributes, from the bicycle and motorcar class derived motorcycle (motorcycle) class, in the succession process, pay attention to the vehicle is set to become the base class. If you do not the vehicle is set to virtual base class, there will be any problem? Try programming.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
vehicle.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.