文件名称:vehicle
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个车(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