title: Cannot access private member declared in class, even declared friend class
body: <p>I have two classes:</p>
  
  <pre><code>class CALLDB;
  class CALL
  {
  friend class CALLDB;
  public:
      string GetStart()const;
  private:
      string start;
  };
  </code></pre>
  
  <p>And second class:</p>
  
  <pre><code>class CALLDB
  {
  friend class CALL;
  public:
  unsigned int Load(istream&amp; fin);
  private:
  unsigned int numCalls;
  };
  </code></pre>
  
  <p>In the main function, I did this:</p>
  
  <pre><code>int main(){
  CALLDB calldata;
  cout&lt;&lt;calldata.numCalls;
  }
  </code></pre>
  
  <p>And then it says:</p>
  
  <blockquote>
    <p>error C2248: 'CALLDB::numCalls': cannot access private member declared in class 'CALLDB'</p>
  </blockquote>
  
  <p>Why does it happen? Is something wrong with my friend class declaration?</p>