Initialise a member variable object that takes a parameter

by ixmx


class MyMemberClass
{
public:
    MyMemberClass(int value)
    {}
};
 
class MyClass
{
    MyMemberClass _member_class;
 
public:
    MyClass():_member_class(123)
    {}
};
Advertisements