नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'override_function' : matches base ref class method 'base_class_function', but is not marked 'virtual', 'new' or 'override'; 'new' (and not 'virtual') is assumed
Remarks
When compiling with /clr, the compiler will not implicitly override a base class function, which means the function will get a new slot in the vtable. To resolve, explicitly specify whether a function is an override.
For more information, see:
C4484 is always issued as an error. Use the warning pragma to suppress C4484.
Example
The following example generates C4484.
// C4484.cpp
// compile with: /clr
ref struct A {
virtual void Test() {}
};
ref struct B : A {
void Test() {} // C4484
};
// OK
ref struct C {
virtual void Test() {}
virtual void Test2() {}
};
ref struct D : C {
virtual void Test() new {}
virtual void Test2() override {}
};