Compiler Error C2677

binary 'operator' : no global operator defined which takes type 'type' (or there is no acceptable conversion)

The specified operator was not defined for the specified type. To use the operator you must overload it for the apropriate type, or define a conversion to a type for which the operator is defined. If you’ve encountered this error on code which compiled with an earlier version of Visual C++, please read Technote: Improved Conformance to ANSI C++ for more information.

The following is an example of this error:

class C
{
   public:
   C();
} c;

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

void main()
{
   1 >> c;   // error
   1 >> d;   // OK, operator int() defined
}