On Sat, May 24, 2008 at 3:31 PM, odbapsvm <[EMAIL PROTECTED]> wrote:
> Does anyone know what happens if you call
> main from main and end up with an infinite loop?
>
> void main(void) {
>
>              void main();
> }
>
> Will you exhaust memory, crash the machine or
> neither.
>
> I know that nothing would be more educational than
> trying it, but I thought that doing this might
> be somewhat dangerous.

I think in ANSI C you can call diredtly main(), I believe, but not in
C++. But don't quote me on that, check the standard.

BTW, main always returns int, it's never void

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
 If I were to divulge it, it would overturn the world."
 -- Jelaleddin Rumi

Reply via email to