Ray's playground

 

Classes(Chapter 10 of The C++ Programming Language)

  Occasionally, a member function is logically const, but it still needs to change the value of a member. To a user, the function appears not to change the state of its object. However, some detail that the user cannot directly observe is updated. This is often called logical constness.

  The storage specifier mutable specifies that a member should be stored in a way that allows updating – even when it is a member of a const object. 

  By definition, a struct is a class in which members are by default public.

  A member function defined within the class definition – rather than simply declared there – is taken to be an inline member function. 

posted on 2010-07-28 21:11  Ray Z  阅读(158)  评论(0编辑  收藏  举报

导航