• 单选题

    下面程序的输出结果是( ) #include using namespace std; class MD { protected: float miles; public: void setDist{miles=d;} virtual float getDist{return miles;} float square{return getDist*getDist;} }; class FeetDist: public MD { protected: float feet; public: void setDist; float getDist{return feet;} float getMiles{return miles;} }; void FeetDist::setDist { feet=ft; MD::setDist; } int main { FeetDist feet; feet.setDist; cout<

    正确答案: B
    可在小程序上查看本题解析,扫码查看
    刷真题 · 看解析 · 听课程
易错题