title: The c++ standard documentation says a program shall not call the main function, but I did
body: <p>It explicitly says in the c++ standard documentation that a program may not call main. Yet I wrote a program that calls main and works perfectly fine, why is that? The code:</p>
  <pre><code>
  #include&lt;iostream&gt;
  
  static int counter = 0;
  
  int main(){
      counter++;
      std::cout &lt;&lt; counter &lt;&lt; &quot; It works&quot; &lt;&lt; std::endl;
      
      while(counter &lt; 10){
          main();
      }
  
      return 1;
  }
  </code></pre>
  <p>It prints to console &quot;It works&quot; 10 times. According to the standard documentation, this should not work, yet it works. What's going on?</p>