title: How can I implement a 'main' method in a class in C++?
body: <p>Consider:</p>
  <pre><code>static class EntranceClass {
  public:
      static void RegisterSomething()
      {
      }
  
      static int main()
      {
          RegisterSomething();
          return 0;
      }
  } // &lt;-- Expected unqualified-id at the end
  </code></pre>
  <p>I'm getting the following error:</p>
  <blockquote>
  <p>expected unqualified-id at end of input main.cpp Problem</p>
  </blockquote>
  <p>Is there a solution?</p>