In following code consider the statement :- "int B::*bpm;"
class B
{
public :
int bi;
};
class D : public B
{
};
int main()
{
D obj;
int B::*bpm;
bpm = &B::bi;
obj.*bpm = 1;
return 0;
}
When to use "Pointer to members" in design/code to improve my design/coding practice. *