|
From: Vivek J. <viv...@ya...> - 2004-10-01 08:38:30
|
Thanks for your reply. But the problem is there is a lot of code in the library I am using. It compiles using Microsoft based compilers. Let alone an error there is not even a single warning that is displayed while compiling using Microsoft based compilers. I also tried compiling this code using an older version of GCC under Linux but there I got some other error. Regards, Vivek Jishtu > >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. _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com |