Making classes public to other classes in C++
问题 If I have two classes for example as follows: class A {...} class B {...} If I want to make class A public to class B , do I just make the members of class A public or I can just use public class A {...} ? Is there a way to tell class B for example that only class A is public for you? In other words, can I make public classes to A protected or private to others? Or, this is just a matter of deriving a class (inheritance)? Thanks. 回答1: There's a substantial difference between making the class