Export (0) Print
Expand All

virtual

The virtual keyword declares a virtual function or a virtual base class.

virtual member-function-declarator
virtual [access-specifier] base-class-name

The elements of a virtual declaration are as follows:

member-function-declarator
Declares a member function.
access-specifier
Defines the level of access to the base class. Can appear before or after the virtual keyword.
base-class-name
Identifies a previously declared class type.

See Virtual Functions and Virtual Base Classes for more information. Also see the following keywords: class, private, public, and protected.

See Also

C++ Keywords

Show:
© 2014 Microsoft