नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'class' : type-class-id redefined as a global data variable
Remarks
You can't use a generic or template class as a global data variable.
This error is obsolete in Visual Studio 2022 and later versions.
This error can be caused if braces are improperly matched.
Examples
The following example generates C2936:
// C2936.cpp
// compile with: /c
template<class T> struct TC { };
int TC<int>; // C2936
// OK
struct TC2 { };
int TC2;
C2936 can also occur when using generics:
// C2936b.cpp
// compile with: /clr /c
generic<class T>
ref struct GC {};
int GC<int>; // C2936
// OK
ref struct GC2 {};
int GC2;