Original Post
I was wondering when to use 2 each method of defining varaibles in the constructor of a class and which one is used when? Im not to sure, exactly of why you would use one over the other.. basically what im taking about is this:
// This
CMyClass::CMyClass()
: var1(0), var2(5.0f), var3(NULL)
{
}
vs.
// this
CMyClass::CMyClass()
{
var1 = 0;
var2 = 5.0f;
var3 = NULL;
}
When do I use one over the other or does it matter?