home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06182.TXT < prev    next >
Encoding:
Text File  |  1993-08-18  |  450 b   |  8 lines

  1. To declare a member function constant, insert the keyword const
  2. after the argument list.  When the function is not inline, this
  3. keyword must appear in both the declaration and the definition.  A
  4. constant member function does not compile successfully if it
  5. attempts to assign a value directly to any data member of its
  6. class.  As with nonmember constants, it is still possible to
  7. assign a value to a member by casting it to a nonconstant type.
  8.