NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C2681

'type' : invalid expression type for name

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

class A { virtual void f(); };

void g(int i)
{
    A* pa;
    pa = dynamic_cast<A*>(i);  // error
}