title: error: expected unqualified-id before ‘.’ token
body: <pre><code>class A
  {
      private:
          A () {}
  
      public:
          static A* getInstance ()
          {
              return new A ();
          }
  };
  
  int main ()
  {
      A.getInstance ();
      return 0;
  }
  </code></pre>
  
  <p>results in the error stated in the title. I do realize that if I create a variable in class A and instanciate it there and return it directly, the error will vanish.</p>
  
  <p>But, here I want to understand what is the meaning of this error and why can't I use it this way.</p>