RAD Studio |  |

Example for "Temporary used ..." error messages (C++)

In this example, function f requires a reference to an int, and c is a char:

Copy Code

    f(int&);
    char c;
    f(c);

Instead of calling f with the address of c, the compiler generates code equivalent to the C++ source code:

Copy Code

    int X = c, f(X);

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