B
Bryan
Hi,
Where is the proper place to use a member initialization list, the
header or cpp file?
Does it make any difference?
Also, is there any difference between using a member initialization list
and initializaing member variables in the constructor?
i.e.
MyClass(void) : a(1), b(2) {};
vs
MyClass::MyClass(void)
{
a = 1;
b = 2;
}
Thanks B
Where is the proper place to use a member initialization list, the
header or cpp file?
Does it make any difference?
Also, is there any difference between using a member initialization list
and initializaing member variables in the constructor?
i.e.
MyClass(void) : a(1), b(2) {};
vs
MyClass::MyClass(void)
{
a = 1;
b = 2;
}
Thanks B