I read a basic C ++ tutorial when I came across
::*
in the following code. Can I find out what it is:
class A {
public:
protected:
int i;
};
class B : public A {
friend void f(A*, B*);
void g(A*);
};
void f(A* pa, B* pb) {
pb->i = 2;
int A::* point_i2 = &B::i;
}
void B::g(A* pa) {
i = 2;
int A::* point_i2 = &B::i;
}
void h(A* pa, B* pb) {
}
int main() { }
based on my knowledge in C ++, I cannot understand something like
int A::* point_i2
Could you help me?
thank.
source
share