Re: diffrence between return and return 0

"engjames2640" <[email protected]> Thu, 22 Feb 2007 16:41:19 -0000
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
--- In [email protected], "ranjane_s" <ranjane_s@...> wrote:
>
> 
> Hi all,
> can anyone please explain me the difference between return and 
return 0
> 
> thanks in advance..
> urs,
> Ranjane.R
>
 
Return 0 places a value of 0 in the cpu register that the calling 
function can use provided you declared your function to return this 
type of data. A function that return void places nothing in the cpu 
register and should not be expected to have a value when it returns. 
The compiler will flag you because these are easy comple time errors.

Thanks,
Jim Smith



------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/0It09A/bOaOAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups - Join or create groups, clubs, forums &amp; communities. Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/cppug/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/cppug/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups - Join or create groups, clubs, forums &amp; communities. is subject to:
    http://docs.yahoo.com/info/terms/