Hello everyone,
I am debugging MSDN code from,
http://msdn2.microsoft.com/en-us/lib...ah(VS.80).aspx
here is my output,
1>main.cpp
1>d:\visual studio 2008\projects\test_c4350\test_c4350\main.cpp(21) :
warning C4350: behavior change: 'B::B(A)' called instead of 'B::B(B
&)'
1 d:\visual studio 2008\projects
\test_c4350\test_c4350\main.cpp(13) : see declaration of 'B::B'
1 d:\visual studio 2008\projects
\test_c4350\test_c4350\main.cpp(9) : see declaration of 'B::B'
1 A non-const reference may only be bound to an lvalue
I do not quite understand why there is a warning A non-const reference
may only be bound to an lvalue and 'B::B(A)' called instead of 'B::B(B
&)'? Could anyone give some descriptions please?
thanks in advance,
George