Nesting
Nesting is quite different than declaring friends. Friends
provide special privileges to members; whereas, nesting
restricts the scope of a class' name and can reduce the
global namespace pollution.
A class' definition can be placed inside the public,
protected, or private sections of another class. The purpose
of this is to hide the nested class' name inside another
class, restricting access to that name.
It does not give either the outer class or the nested class
any special privileges to access protected or private
members of either class.
A nested class does not allow the outer class access to its
hidden members....the name of the nested class is hidden.