Hi,

A constructor is not allowed to return anything. The compiler itself returns 
the pointer to the object initiated by the constructor. Ofcourse, all this 
is transparent to the programmer.

  -Siddharth.






>From: "SHRIDHAR N. DAITHANKAR" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [LI] Some C++ doubts
>Date: Tue, 25 Jan 2000 15:31:13 +0530 (IST)
>
>
>  Hi all
>
>    I have some doubts regarding C++. I am using DJGPP under Win95.
>
>  1)An error is encountered when constructor is involved in return
>statement. e.g. following statement is not allowed
>
>    return(Vector ftemp(temp));
>
>But following thing works.
>
>    Vector ftemp(temp);
>    return(temp);
>
>  2)It seems that I am not able to overload the . operator. Is it correct?
>
>Please help.
>
>   Bye
>    Shridhar
>
>
>--------------------------------------------------------------------
>The Linux India Mailing List Archives are now available.  Please search
>the archive at http://lists.linux-india.org/ before posting your question
>to avoid repetition and save bandwidth.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.

Reply via email to