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 C2662

'function' : cannot convert 'this' pointer from 'type1' to 'type2'

The compiler could not convert the this pointer from type1 to type2.

Possible cause

Possible solutions

Example

class C
{
public:
   void func1();
   void func2() const;
} const c;

void main()
{
   c.func1();  // error
   c.func2();  // no error
}