Yose Adrian wrote:

> Hello all,
>
>    I'm still confusing with the return command. Such as the difference
> between
> return 0, return value etc. And the effect to program when misuse of it, if
> any.
> So anyone would explain it briefly please.
>
> Thanks and sorry for my silly question :-).
>
> --Me, myself--

2 common extremely simple misuses of return are

1) Not returning a value from a function in which a return type was declared. Usually 
this gives

a compile error and is corrected by adding an appropriate return statement.

2) Returning a type other than the declared value for the return type:

for exaple, the function:

    int foo()

    {

       float y;

       return y;

     }

would generate an error because it's retuurning type float where an int is expected.



--
email: [EMAIL PROTECTED]
Local mailserver  , remote


Reply via email to