Compiler Error C2647

'operator': cannot dereference a 'type1' on a 'type2'

The left-hand side of a pointer to member operator (either '->*' or '.*') could not be implicitly converted to a type related to the right-hand side of the operator.

The following is an example of this error:

class C {};
class D {};

void main()
{
   D d, *pd;
   C c, *pc;
   int C::*pmc;

   pd->*pmc = 0;   // error
   d.*pmc = 0;   // error
   pc->*pmc = 0;   // okay
   c.*pmc = 0;   // okay
}