#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貢獻(xiàn)883條經(jīng)驗(yàn) 獲得超454個(gè)贊
我看到你在我另一個(gè)很久遠(yuǎn)的回答下的回復(fù)了。
從那個(gè)問(wèn)題給出的圖來(lái)看,這個(gè) FightPlane 的父類(lèi)是不是 Plane ?。??是的話(huà),那你就是大小寫(xiě)錯(cuò)了...
因?yàn)闃?gòu)造初始化列表也可以給成員賦初值,所以那個(gè)報(bào)錯(cuò)說(shuō)“找不到叫 plane 的成員”。
- 2 回答
- 0 關(guān)注
- 1474 瀏覽
添加回答
舉報(bào)
0/150
提交
取消