博主,我经过测试,发现常函数能定义为虚函数 virtual getData const(){ return data;} 能编译和运行
点赞 1

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务