RAD Studio |  |

operator
See Also
Collapse All

Category

Operators, C++-Specific Keywords

Syntax

Copy Code

    operator <operator symbol>( <parameters> )
    {
    <statements>;
    }

Description

Use the operator keyword to define a new (overloaded) action of the given operator. When the operator is overloaded as a member function, only one argument is allowed, as *this is implicitly the first argument.

When you overload an operator as a friend, you can specify two arguments.

See Also

class

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