Compiler Error C2775

'identifier' : no 'get' method is associated with this property

A structure or class data member declared with the property extended attribute does not have a get function specified, and this data member is used in an expression that tries to retrieve its value. For example:

struct A {
   __declspec(property(put=PutProp)) int prop;
   int PutProp(void);
};

int f(A* pa)
{
   int x = pa->prop;   // error C2775
   return x;
}