नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'
derived class' : default constructor was implicitly defined as deleted
Remarks
Because the default constructor is deleted or inaccessible in a base class, the compiler can't generate a default constructor for the derived class. Attempts to create an object of this type by using the default constructor (for example, in an array) cause a compiler error.
This warning is off by default. For more information, see Compiler warnings that are off by default.
Example
The following example generates C4623.
// C4623.cpp
// compile with: /W4
#pragma warning(default : 4623)
class B {
B();
};
class C {
public:
C();
};
class D : public B {}; // C4623 - to fix, make B's constructor public
class E : public C {}; // OK - class C constructor is public
int main() {
// D d; // Error C2280
}