Hi all,
How about this?
In this example, what is the correct way to initialise Secret mission?
class Secret
{
private:
int data;
public:
Secret(int _data)
{
data = _data;
}
};
class Mission
{
public:
Secret mission;
Mission();
{
}
};
the only way i know of is using the initialisation list
Mission():mission(22) {};
is this method correct? is there any other method?