Compiler Error C3886
'var' : a literal data member must be initialized
A literal variable must be initialized when it is declaraed.
The following sample generates C3886:
// C3886.cpp
// compile with: /clr /c
ref struct Y1 {
literal int staticConst; // C3886
literal int staticConst2 = 0; // OK
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for