다이아몬드 상속

    [C++ Primer Plus] 14. Reusing Code in C++

    대답해야 할 질문들 has-a 관계를 가지는 두 가지 방법은 무엇인가? 다이아몬드 상속을 할 때, 신경써줘야하는 부분은 무엇인가? template class에서 implicit/explicit instantiation과 specialization의 문법은 무엇인가? Classes with Object Members 클래스가 오브젝트 멤버를 가지는 방법은 2가지다. 오브젝트를 변수로 선언한다. (containment) protected or private으로 상속한다. Private Inheritance 상속할 때, Private으로 상속하면 base-class의 public 멤버와 protected 멤버가 derived-class의 private 멤버가 된다. 즉, 인터페이스가 똑같이 이어지는 게 아니기..