All data members are instntiated as soon as you instantiate an object of the class they belong to. But you seem to be asking about initialization, or at least how to ensure that the data embers have a certain value after the constructor of the class that owns them has been called.
It would make the most sense to initialize the members in the constructor initialization list*:
Rectangle(int s1, int s2) : a(s1), b(s2) {}
Note that you can still modify the data members at any point after initialization. In this example, assignment is used:
a = Side(1);
b = Side(42);
* In this case, there is no option if you want to keep Rectangle
's constructor, because Side
has no default constructor. If you don't explicitly construct the members in the constructor's initialization list, their default constructor is implicitly called, so they must be default constructable.