Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 739 Bytes

compiler-error-c2679.md

File metadata and controls

34 lines (28 loc) · 739 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Error C2679
Compiler Error C2679
11/04/2016
C2679
C2679
1a5f9d00-9190-4aa6-bc72-949f68ec136f

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 {
public:
   C();   // no constructor with an int argument
} c;

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

int main() {
   c = 10;   // C2679
   d = 10;   // OK
}