Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Error C2679
Collapse the table of content
Expand the table of content

Compiler Error C2679

binary 'operator' : no operator found which takes a right-hand operand of type 'type' (or there is no acceptable conversion)

To use the operator, you must overload it for the specified type or define a conversion to a type for which the operator is defined.

The following sample generates C2679:

// C2679.cpp
class C {
   C();   // no constructor with an int argument
} c;

class D {
   D(int) {}
} d;

int main() {
   c = 10;   // C2679
   d = 10;   // OK
© 2015 Microsoft