Possible Duplicate:
Can main function call itself in C++?
I decided to do a small test using CodeBlock IDE by calling the main function which should be an illegal act.
EX:
#include <iostream>
using namespace std;
int main()
{
cout<<"hello"<<endl;
main();
return 0;
}
Strangely, in code blocks I was able to compile this mess. Does anyone know why?
Output: hello