title: Making classes public to other classes in C++
body: <p>If I have two classes for example as follows:</p>
  
  <pre><code>class A {...}
  
  class B {...}
  </code></pre>
  
  <p>If I want to make class <code>A</code> public to class <code>B</code>, do I just make the members of class <code>A</code> public or I can just use <code>public class A {...}</code>?</p>
  
  <p>Is there a way to tell class <code>B</code> for example that only class <code>A</code> is public for you? In other words, can I make public classes to <code>A</code> protected or private to others? Or, this is just a matter of deriving a class (inheritance)?</p>
  
  <p>Thanks.</p>