Please bare with me, as i have been converting my application to linux and run into a few differences between MSVC and g++ compilers. The following code produces an error in g++ and not in MSVC:
void foo(Class& c)
{
(...)
}
int bar(void)
{
foo(Class(param1, param2));
}
The error is that the compiler is unable to convert from type c to c&.
When i convert the code to the following - everything works as planned, however i would like to avoid the extra variable and line of code.
int bar(void)
{
Class temp(param1, param2);
foo(temp);
}
If anyone is able to provide some insight into my "problem" it would be greatly appreciated.
[Edited by - shrtysk8r1 on June 6, 2005 9:33:58 PM]