Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 4) C4610
Collapse the table of content
Expand the table of content

Compiler Warning (level 4) C4610

Error Message

object 'class' can never be instantiated - user-defined constructor required

The class has no user-defined or default constructors. No instantiation is performed. The following sample generates C4610:

// C4610.cpp
// compile with: /W4
struct A {
   int &j;

   A& A::operator=( const A& );
};   // C4610

/* use this structure definition to resolve the warning
struct B {
   int &k;

   B(int i = 0) : k(i) {

   B& B::operator=( const B& );
} b;

int main() {

Community Additions

© 2015 Microsoft