The Implicit call calls the copy constuctor directly. Whereas the explicit call
first call the copy constructor, creates the object and then again calls the
assignment operator to assign this newly created to an another object.
Knowledge Seeker <[EMAIL PROTECTED]> wrote: Manish wrote:
> Dear Experts
>
> What is the advantage in an explicit call. Both look the same to me.
>
> Samp obj(10,12); // Implicit call
> Samp obj = Samp(12,22) // Explicit Call
>
> Both compile fine in Borland Turbo C 3.0.
I dare you use a new compiler ;)
> Is it matter of style?
> Generally which of the two is preferred?
>
> Thanks a lot
>
> manish
>
>
>
---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
[Non-text portions of this message have been removed]