Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
'type' : invalid expression type for name
Remarks
A casting operator tried to convert from an invalid type. For example, if you use the dynamic_cast operator to convert an expression to a pointer type, the source expression must be a pointer.
Example
The following example generates C2681:
// C2681.cpp
class A { virtual void f(); };
void g(int i) {
A* pa;
pa = dynamic_cast<A*>(i); // C2681
}