Export (0) Print
Expand All
Expand Minimize

Compiler Error C2760

Error Message

syntax error : expected 'name1' not 'name2'

A casting operator is used with an invalid operator.

The following sample generates C2760:

// 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
}

Community Additions

ADD
Show:
© 2015 Microsoft