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 C2819

type 'type' does not have an overloaded member 'operator ->'

You need to define operator->() to use this pointer operation.

Example

class A {
public:   
   int i;
};

class B {
};

void C(B j)
{
   j->i; // error C2819
}

Solution

The following code fixes the problem:

class B {
   A* pA;
   
public:
   
   A* operator->()
   {
      return pA;
   }
};