Talk About Network

Google


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++ > Re: tem****ary ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 45800 of 47017
Post > Topic >>

Re: tem****ary object in function call

by "Alf P. Steinbach" <alfps@[EMAIL PROTECTED] > May 7, 2008 at 11:13 PM

* thucdat@[EMAIL PROTECTED]
> 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.

It's a Visual C++ language extension, i.e. non-standard.

Whether it's smarter or not, who knows. :-)


Cheers, & hth.,

- Alf

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 




 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 Jul 24 16:01:53 CDT 2008.