Error del compilador C3886

Actualización: noviembre 2007

Mensaje de error

'var' : se debe inicializar un miembro de datos literal
'var' : a literal data member must be initialized

Una variable literal debe inicializarse cuando se declara.

El ejemplo siguiente genera el error C3886:

// C3886.cpp
// compile with: /clr /c
ref struct Y1 {
   literal int staticConst;   // C3886
   literal int staticConst2 = 0;   // OK
};