'variable' : only const static integral data members can be initialized inside a class or struct"
You attempted to initialize a nonstatic data member.
class B { int i = 3; // C2864; // try ... // static const int i = 3; };