Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > temporary objec...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 45800 of 45898
Post > Topic >>

temporary object in function call

by thucdat@[EMAIL PROTECTED] May 7, 2008 at 02:08 PM

Visual Studio C++ compiles the following:



class someclass {
        //
};

void somefunction(someclass &) {
       //
}

int main() {
       somefunction(someclass());
       return 0;
}



But Dev-C++ (Bloodshed) and g++ don't. I wonder if Visual Studio C++
is smarter here.




 4 Posts in Topic:
temporary object in function call
thucdat@[EMAIL PROTECTED]  2008-05-07 14:08:01 
Re: temporary object in function call
"Alf P. Steinbach&qu  2008-05-07 23:13:57 
Re: temporary object in function call
red floyd <no.spam@[EM  2008-05-07 16:35:47 
Re: temporary object in function call
"Jim Langston"   2008-05-07 19:27:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:37:19 CDT 2008.