文件名称: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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
