Can anyone tell me (or point me to where I can get info) about the difference between:
Style 1:
and
Style 2:
Style 1 is the normal procedure but occasionally I've seen people using Style 2. Presumably there's some advantage to it in some circumstances. Does anybody know what it could be?
Thanks in advance.
Style 1:
Code:
MyClass::MyClass()
{
m_iMyMember = 0;
}
and
Style 2:
Code:
MyClass::MyClass() :
m_iMyMember(0)
{
}
Style 1 is the normal procedure but occasionally I've seen people using Style 2. Presumably there's some advantage to it in some circumstances. Does anybody know what it could be?

Thanks in advance.