|
From: Daniel K. O. <dan...@bo...> - 2004-09-30 20:54:28
|
Vivek Jishtu wrote: >What am I missing out? > > void myfun(First &obj) > > This line receives a non-const reference. You can't get a non-const reference from a temporary object. > Obj2.myfun(First()); > > Ta-da!!! Here you are using a reference to a temporary object. Daniel K. O. |