static_cast

    [C++ Primer Plus] 15. Friends, Exceptions, and More

    대답해야 할 질문들 Friend class와 Friend member function의 사용법이 무엇인가? Nested class를 쓰는 이유는 무엇인가? return과 throw의 차이점이 무엇인가? exception을 레퍼런스로 catch하는 이유는 무엇인가? undefined exception과 unexpected exception이 무엇인지 설명하고 어떻게 해결할 수 있는지 설명하시오. RTTI의 세가지 구성요소는 무엇인가? C++의 explicit casting을 설명하시오. Friends 이제까지 friend function만 배웠지만, friend class도 가능하다. friend class가 마치 OOP를 해칠 것만 같은 느낌을 주지만 그렇지 않다. 그 이유는 2개다. 먼저 friend ..