RAD Studio |  |

virtual

Category

C++-Specific Keywords

Syntax

Copy Code

    virtual class-namevirtual
    virtual function-name

Description

Use the virtual keyword to allow derived classes to provide different versions of a base class function. Once you declare a function as virtual, you can redefine it in any derived class, even if the number and type of arguments are the same.

The redefined function overrides the base class function.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!