const4.c

来自「gcc-you can use this code to learn somet」· C语言 代码 · 共 25 行

C
25
字号
// PRMS Id: 8927// Bug: complex inheritance interferes with const checkingclass GrandParent {public:  virtual void DoIt();protected:  int A;};class Parent : virtual public GrandParent {public:  virtual void DoX() const;};class Child : public Parent {public:  void DoX() const;};void Child::DoX() const{  A = 10;		// ERROR - assignment to const}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?