C++ 学习笔记(一些新特性总结3) public.protected 和 private 继承 public 继承时,基类的存取限制是不变的. class MyClass { public: // Unrestricted access int myPublic; protected: // Defining or derived class only int myProtected; private: // Defining class only int myPrivate; } class…