14.11. GlossaryΒΆ


In general use, a class is a user-defined type with member functions. In C++, a class is a structure with private instance variables.

accessor function:

A function that provides access (read or write) to a private instance variable.


A condition, usually pertaining to an object, that should be true at all times in client code, and that should be maintained by all member functions.


A condition that is assumed to be true at the beginning of a function. If the precondition is not true, the function may not work. It is often a good idea for functions to check their preconditions, if possible.


A condition that is true at the end of a function.

You have attempted of activities on this page