What's the difference ?

Posted By: Nidhogg

What's the difference ? - 08/11/08 06:34

Just a quick question.. Is there any difference to using
a void or function other than void is pure mode and function
is legacy mode. eg: Do they execute in a different way.
Is one more flexable than the other.

Please explain...
Posted By: Fenriswolf

Re: What's the difference ? - 08/11/08 07:02

Hello,

a function returns a var while a void doesn't return anything.
Posted By: Nidhogg

Re: What's the difference ? - 08/11/08 07:08

Ah ok, Thanks for the quick reply..

So basicly, If I don't need a return value I can just use void?
Posted By: Fenriswolf

Re: What's the difference ? - 08/11/08 07:22

Yes, exactly.
Unless you want to return a pointer of unspecified type - in that case you would use a void* rather than a void.
© 2024 lite-C Forums