함수명 뒤에 오는 const

2019, Mar 20    

ex) ChannelInfo* D2dRenderer::GetChannelPtr(const int index) const {}

  • 멤버함수에서 사용.
  • 모든 멤버 변수를 const 처럼 사용.
  • 이 함수에서는 멤버변수를 수정하지 않겠다는 표시.

참조 : https://kldp.org/node/42466