Connecting Tech Pros Worldwide Forums | Help | Site Map

new foo -vs- new foo()

Robert Allan Schwartz
Guest
 
Posts: n/a
#1: Jul 22 '05
Given:
class foo { };

What is the difference between:

new foo

and

new foo()

?

When would I use the first form, when would I use the second form, and
why are there two different forms for what is apparently the same
thing?

Thanks,

Robert Schwartz

Alex Vinokur
Guest
 
Posts: n/a
#2: Jul 22 '05

re: new foo -vs- new foo()



"Robert Allan Schwartz" <notbob@tessellation.com> wrote in message news:1166fd92.0408110441.705ab6e1@posting.google.c om...[color=blue]
> Given:
> class foo { };
>
> What is the difference between:
>
> new foo
>
> and
>
> new foo()
>
> ?
>
> When would I use the first form, when would I use the second form, and
> why are there two different forms for what is apparently the same
> thing?
>
> Thanks,
>
> Robert Schwartz[/color]

See the thread titled "new X vs new X() "
at http://groups.google.com/groups?thre...ing.google.com


\
--
Alex Vinokur
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn



marbac
Guest
 
Posts: n/a
#3: Jul 22 '05

re: new foo -vs- new foo()


[color=blue]
>
>
> See the thread titled "new X vs new X() "
> at http://groups.google.com/groups?thre...ing.google.com
>
>[/color]

Maybe this is also useful:

http://www.parashift.com/c++-faq-lit....html#faq-26.7
Closed Thread