It will show error

On Sun, Aug 21, 2011 at 12:21 PM, Sanjay Rajpal <srn...@gmail.com> wrote:

> I think it will not be an error.
>
> This is because X() will create a temporary object, and when the
> object is returned in the function calling it, then default copy
> constructor will do bitwise copy of data members in the calling
> function.
>
> Correct me if m wrong.
>
> On 8/20/11, sachin sabbarwal <algowithsac...@gmail.com> wrote:
> > class X()
> > {
> >
> > X()
> > {
> > }
> >
> >
> >
> > X fun()
> > {
> > return X();      //error or what?? because constructor never returns
> > anything so what this return statement will receive after executing x()
> and
> > what it will return??
> > }
> >
> >
> > };
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post to this group, send email to algogeeks@googlegroups.com.
> > To unsubscribe from this group, send email to
> > algogeeks+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/algogeeks?hl=en.
> >
> >
>
>
> --
> Sanju
> :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>


-- 
With regards
  ............
Puneet Chawla
Computer Engineering Student
NIT Kurukshetra

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to