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

  1. Like objects of built-in type, objects of class type can be
  2. declared to be constant.  A constant object of class type is one
  3. in which no data member should be altered after the object has
  4. been initialized.  For a built-in type, the compiler can flag any
  5. attempt to alter the value of a constant object as a syntax error.
  6. An attempt to alter a member of a constant object of class type
  7. cannot always be detected by the compiler.  Constant member
  8. functions are used to protect constant class objects.
  9.