| <<< | Index | >>> |
All constructors "chain" to sub-object constructors first:
class Cylinder {};
class Transmission {};
class Wheel {};
class Engine {
Cylinder m_cylinder[ 2 ];
};
class Moped {
Engine m_engine;
Transmission m_transmission;
Wheel m_wheel[ 2 ];
};
void main()
{
Moped honda;
}
|
|
| <<< | Index | >>> |