bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

typedef and &


From: Chabane Rezzik
Subject: typedef and &
Date: Mon, 17 Sep 2001 10:35:01 -0500

Hi there,

Could you please explain to me why this code does not compile?

typedef int MyInt;

void get( int& );

int main( int argc, char* argv[] ) {
    MyInt x;
    get( x );   <------ Compile error here
}

Here is the compile error:

initializing non-const `int *&' with `MyInt *' will use a temporary



Thanks,
Chabane





reply via email to

[Prev in Thread] Current Thread [Next in Thread]