This documentation is archived and is not being maintained.

Compiler Error C2677

binary 'operator' : no global operator found which takes 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.

Example

// C2677.cpp
class C
{
   public:
   C();
} c;

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

int main()
{
   1 >> c;   // C2677
   1 >> d;   // OK, operator int() defined
}
Show: