C Language and Libraries Help (clang.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
class
◄Up► ◄Contents► ◄Index► ◄Back►
─────C/C++ Language─────────────────────────────────────────────────────────
Keyword: class
Syntax: class [models] [tag [: base-list]]
{
member-list
} [declarators];
[ class ] tag declarators;
Summary: Declares a class type or defines an object of a class
type.
See also: struct, union, public, private, protected
◄Memory Models►
The elements of a class definition are as follows:
Element Description
<models> Specifies the default memory model for
objects of the class type: __near, __far,
or __huge.
<tag> Names the class type. The tag becomes a
reserved word within the scope of the class.
<base-list> Specifies the class(es) from which the class
is derived (its base classes). Each base
class's name can be preceded by an access
specifier (public, protected, private)
and the virtual keyword.
See: virtual
◄Access Specifiers►
<member-list> Declares members or friends of the class.
Members can include data, functions, nested
classes, enums, bit fields, and type names.
Friends can include functions or classes.
Explicit data initialization is not
allowed. A class type cannot contain
itself as a nonstatic member. It can
contain a pointer or a reference
to itself.
See: virtual
◄Access Specifiers►
<declarators> Declares one or more objects of the class
type.
-♦-