'const' : must be initialized in constructor base/member initializer list
The constructor does not initialize the const variable in an initializer list. The compiler leaves the constant undefined. Reference and const member variables must be given a value when initialized or in the constructor.
The following sample generates C2758:
struct A { const int i; A(int i){ // C2758 // try ... // A(int i) : i(0) { }; }; void main() { }