नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'class' : non-class type as already been declared as a class type
Remarks
The non generic or template class redefines a generic or template class. Check header files for conflicts.
Examples
The following example generates C2990:
// C2990.cpp
// compile with: /c
template <class T>
class C{};
class C{}; // C2990
C2990 can also occur when using generics:
// C2990b.cpp
// compile with: /clr /c
generic <class T>
ref struct GC;
ref struct GC {}; // C2990
C2990 can also occur due to a breaking change in the Microsoft C++ compiler for Visual Studio 2005; the compiler now requires that multiple declarations for the same type be identical with respect to template specification.
The following example generates C2990:
// C2990c.cpp
// compile with: /c
template<class T>
class A;
template<class T>
struct A2 {
friend class A; // C2990
};
// OK
template<class T>
struct B {
template<class T>
friend class A;
};