This documentation is archived and is not being maintained.

Compiler Error C2760

syntax error : expected 'name1' not 'name2'

A casting operator is used with an invalid operator.

Example

// C2760.cpp
class B { };
class D : public B {  };

void f(B* pb)
{
    D* pd1 = static_cast<D*>(pb);
    D* pd2 = static_cast<D*>=(pb);  // C2760
    D* pd3 = static_cast<D*=(pb);   // C2760
}
Show: