0
Member Initializers slide 2
I believe the code on this page has a formatting error. look at lines 5 and 6. the curly braces {} don't line up in a logical way. 1 class MyClass { 2 public: 3 MyClass(int a, int b) 4 : regVar(a), constVar(b) 5 { 6 } 7 private: 8 int regVar; 9 const int constVar; 10 };
1 Antwort
0
I'd put a carriage return between them to make it more easier to recognise at a glance, then probably a comment as well.
{
//expressions.
}