class (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


C++ Specific Keywords, Type Specifiers


<classkey> <classname> <baselist> { <member list> }
  • <classkey> is a class, struct, or union.
  • <classname> can be any name unique within its scope.
  • <baselist> lists the base class(es) that this class derives from. <baselist> is optional.
  • <member list> declares the data members of the class and member functions.


Use the class keyword to define a C++ class.

Within a class:

  • The data is called data members.
  • The functions are called member functions.

See Also