Teilen über


Compilerfehler C3886

'var': Ein Literaldatenelement muss initialisiert werden.

Bemerkungen

Eine Literalvariable muss initialisiert werden, wenn sie deklariert wird.

Example

Im folgenden Beispiel wird C3886 generiert:

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