नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'variable' : static data members of managed or WinRTtypes must be defined within the class definition
Remarks
You attempted to reference a static member of a WinRT or .NET class or interface outside the definition of that class or interface.
The compiler needs to know the full definition of the class (to emit the meta-data after one pass) and requires static data members to be initialized within the class.
Example
For example, the following example generates C3366 and shows how to fix it:
// C3366.cpp
// compile with: /clr /c
ref class X {
public:
static int i; // initialize i here to avoid C3366
};
int X::i = 5; // C3366