#include "fighterplane.h"#include <iostream>using namespace std;FighterPlane::FighterPlane(string code):plane(code){? ? //ctor}void FighterPlane::takeoff(){? ? cout <<"FighterPlane--takeoff"<<endl;}void FighterPlane::land(){? ? cout <<"FighterPlane--land"<<endl;}
2 回答
已采納

onemoo
TA貢獻883條經(jīng)驗 獲得超454個贊
我看到你在我另一個很久遠的回答下的回復了。
從那個問題給出的圖來看,這個 FightPlane 的父類是不是 Plane 啊? ?是的話,那你就是大小寫錯了...
因為構(gòu)造初始化列表也可以給成員賦初值,所以那個報錯說“找不到叫 plane 的成員”。
- 2 回答
- 0 關(guān)注
- 1461 瀏覽
添加回答
舉報
0/150
提交
取消