Link to home
Start Free TrialLog in
Avatar of barryc
barryc

asked on

Followup) Computers:Programming:Languages->"easy one"

In the locked question "easy one" under the group "Computers:Programming:Languages", somebody makes the point that you can NOT call "main()" recursively in C++ (only in C) and another contests this point.  

Calling "main()" recursively under SunPro CC 4.2 and 5.0 fails, but succeeds under g++ 2.8.1.  It supposedly works in Visual C++.

I tried to find a reference to "main()" and "recursive" in Stroustrup 3rd Edition and in Schildt 3rd Edition, and had no luck.

I do not have a copy of the standard.  Just wondering if anyone knew if the standard prohbits the recursive calling of main()?
Avatar of nietod
nietod

I'll look into it.  But I don't remember any restriction against it.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> I do not have a copy of the standard.

The copy I use is at

http://www.cygnus.com/misc/wp/

This is the final _draft_ version.  The final version is not available for free, but can be downloaded for about $15.  (a printed copy is like $300).  However the draft standard is extremely close to the final standard, so I don't think its worth the money.

Of course, this will probably cost me a lot of points...   : - )
Avatar of barryc

ASKER

Thanks nietod!