您的位置:首页 > 其它

error: 'xxx函数' is inaccessible,'Text' is not an accessible base of 'TextLine'

2017-06-05 14:42 1576 查看
这是因为C++ 多继承写法出错。

多继承正确写法:

class TextLine : public Item, public Text
而不是
class TextLine : public Item, Text
虽然后者在当前类也能编译通过!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  多继承
相关文章推荐