This documentation is archived and is not being maintained.

Compiler Error C2638

Error Message

'identifier' : __based modifier illegal on pointer to member

The __based modifier cannot be used for pointers to members.

The following sample generates C2638:

// C2638.cpp
void *a;

class C {
   int i;
   int j;
   int func();
int __based (a) C::* cpi = &C::i;  // C2638
int (__based (a) C::* cpf)() = &C::func; // c2638