文件名称:c
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
定义一个车(vehicle)基类,有Run、Stop等成员函数,由此派生出自行车(bicycle)类、汽车(motorcar)类,从bicycle和motorcar派生出摩托车(motorcycle)类,它们都有Run、Stop等成员函数。在main()函数中定义vehicle、bicycle、motorcar、motorcycle的对象,调用其Run()、Stop()函数,观察其执行情况。再分别用vehicle类型的指针来调用这几个对象的成员函数,看看能否成功;把Run、Stop定义为虚函数,再试试看。-The definition of a car (vehicle) base class, with Run, Stop and other member functions, thus derived a bike (bicycle), automobiles (motorcar) class, derived from the bicycle and motorcar motorcycle (motorcycle) class, they all Run , Stop and other member functions. In the main () function is defined in the vehicle, bicycle, motorcar, motorcycle object, call its Run (), Stop () function is to observe its implementation. Each with a pointer with the vehicle type to call the member functions of these objects to see if successful the Run, Stop is defined as virtual functions, try again.
相关搜索: vehicle
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4355898_5515dab3d9.jpg
c.txt
c.txt