RAD Studio |  |

E2330: Operator must be declared as function (C++)

An overloaded operator was declared with something other than function type.

For example:

Copy Code

    class A
    {
       A& operator +;   ..note missing parenthesis
    };

In the example, the function operator '()' is missing, so the operator does not have function type and generates this error.

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