title: What's the difference between friendship and inheritance?
body: <p>Suppose there are two classes A and B:</p>
  
  <pre><code>class A {};
  class B {};
  </code></pre>
  
  <p>In what aspects differ the two examples below?</p>
  
  <p>Example 1:</p>
  
  <pre><code>class C : public A, public B {}; 
  </code></pre>
  
  <p>Example 2: </p>
  
  <pre><code>class C
  {
      //private
      friend class A;
      friend class B;
  }
  </code></pre>