A
asdf
The oder of member initialization is the order in which the members are
defined.
So the following code is problematic:
class X{
int i;
int j;
public:
X(int val):j(val),i(j){}
};
But, can I use the following code?
class X{
int i;
int j;
public:
X(int val)
{j=val; i=j;}
};
defined.
So the following code is problematic:
class X{
int i;
int j;
public:
X(int val):j(val),i(j){}
};
But, can I use the following code?
class X{
int i;
int j;
public:
X(int val)
{j=val; i=j;}
};