有以下类定义
#include
usin...
发布于 2022-03-03 11:36:39
有以下类定义
#include <iostream> using namespace std class shape { public: virtual int area() = 0 } class rectangle :public shape { public: int a, b void setLength(int x, int y) { a = x b = y } int area() { return a * b } }若有语句定义rectangle r r.setLength(3,5) 则编译时无语法错误的语句是( )
登录后免费查看答案
关注者
0
被浏览
24