[C++] Protected 선언과 세 가지 형태의 상속 접근지정자 중 Protected에 대해서 알아보겠습니다. 세 가지 접근지정자로 지정한 변수를 멤버변수로 갖고 있는 클래스를 만들어 확인해 보겠습니다. #include using namespace std; class Base { private: int num1; protected: int num2; public: int num3; void ShowData() { cout c++/상속(Inheritance)의 이해 2023.01.06