title: cannot access private member declared in class
body: <p>this is my first question in here :)
  i have i little problem..
  these are my classes:</p>
  
  <pre><code>class Gracz{
      char znak_gracza;
  public:
      Gracz();
      Gracz(char znak){
              this-&gt;znak_gracza = znak;
          };
      friend void multiplayer();
  };
  class Osoba: public Gracz{
  public:
      Osoba();
      Osoba(char znak){
              this-&gt;znak_gracza = znak;
          };
      friend void multiplayer();
  };
  </code></pre>
  
  <p>i also have a function multiplayer, where i try tu use constructor with argument:</p>
  
  <pre><code>void multiplayer(){
      Osoba gracz1('O');
      Osoba gracz2('X');
  ...
  }
  </code></pre>
  
  <p>but it doesn't work.</p>
  
  <p>errors are same for <code>gracz1</code> and <code>gracz2</code></p>
  
  <pre><code>error C2248: 'Gracz::znak_gracza' : cannot access private member declared in class 'Gracz'
  see declaration of 'Gracz::znak_gracza'
  see declaration of 'Gracz'
  </code></pre>