class (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

C++ Specific Keywords, Type Specifiers

Syntax

<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.

Description

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