RAD Studio |  |

E2084: Parameter names are used only with a function body (C++)

When declaring a function (not defining it with a function body), you must use either empty parentheses or a function prototype.

A list of parameter names only is not allowed.

Example declarations

Copy Code

    int func();             /* declaration without prototype -- OK */
    int func(int, int);     /* declaration with prototype -- OK */
    int func(int i, int j); /* parameter names in prototype -- OK */
    int func(i, j);         /* parameter names only -- ILLEGAL */

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