Then the pointer would not be a member of the class B.
Not a member? How?
Let me illustrate a couple of things by an example. The purpose of
pointer-to-member types is to facilitate nameless selection of class
members (as opposed to named selection we usually use).
For example, consider this code sample
struct A { int a; }
struct B {
int x;
int y;
A a;
int z[10];
};
void zero(B* b, unsigned n, int B::*m) {
for (; n > 0; --n, ++b)
b->*m = 0;
}
Now, I can use the above simple 'zero' function I can set to zero any
immediate member of all 'B' objects in an array
B b[10];
zero(b, 10, &B::x); // sets all 'B::x's to zero
zero(b, 10, &B::y); // sets all 'B::y's to zero
Or I can choose what to zero based on some run-time criteria
zero(b, 10, rand() % 2 == 0 ? &B::x : &B::y);
This is the valuable run-time flexibility provided by pointers of
pointer-to-member type (in this case applied specifically to data members).
However, what if I want to zero 'B::a.x' members in the 'b' array? Or
what about zeroing 'B::z[5]' in each element of the 'b' array? In C++
you can't do that. And the truth is that from the implementation point
of view the above pointer type ('int B::*m') is already capable of
holding the required value (to point to either 'B::a.x' or 'B::z[5]'),
but the language simply has no syntax to assign that value to that
pointer. (It can be done with a hack though).
Your solution with a regular pointer inside 'B' will "work", but suffers
from a number of problems that essentially defeat the purpose in general
case. If it is good enough for the OPs specific case - great. But how
are you going to do it without placing anything into 'B'?