Class nesting is just having one class specified in another, as in:
class A
{
public:
class B
{
public:
class C{};
};
};
Then, like with namespaces, you can use the scope operator to access a nested class:
A a;
A::B b;
A::B::C c;
It is now an aggregate when one class contains the object of another class:
class D
{
public:
A myA;
void do_something();
private:
A::B myB;
};
If the member is public, you can access it as follows:
D d;
process( d.myA ); // access to myA
If it is not accessible, you can make it available with a function.
In any case, you may directly access the member from within the class functions:
void D::do_something()
{
doit( myB );
// or
doit( this->myB );