Use intializer list whenever possible because it''s more efficient. In your example here:
// ThisCMyClass::CMyClass(): var1(0), var2(5.0f), var3(NULL){}vs. // thisCMyClass::CMyClass(){var1 = 0;var2 = 5.0f;var3 = NULL;}
in the second case the compiler has to insert code to first call the constructor on each of you variables, then create a temporary variable for the constants, invoke the assignment operator and then destroy the temporary variables. Where as in the first example the compiler only needs to invoke the copy constructor. Also, in certain cases you have to use intializer list:
1. When initializing reference variables
2. When initializing const members
3. When invoking base/member class contructors with a set of arguments