Class nesting is just a class defined in another class, for example:
class A
{
public:
class B
{
public:
class C{};
};
};
Then you can access the nested class using the scope operator, for example, with a namespace:
A a;
A::B b;
A::B::C c;
Now that the class contains another object class , it is aggregation :
class D
{
public:
A myA;
void do_something();
private:
A::B myB;
};
Then you can access this element if it is open:
D d;
process( d.myA );
, . :
void D::do_something()
{
doit( myB );
doit( this->myB );
}