class Test{
public:
int a, b, c;
Test(int i){
a = i;
b = c = 0;
}
~Test(){
a = b = c = 0;
}
};
int Test::*v[] = {&Test::a, &Test::b, &Test::c};
void f(Test *a, int Test::*b, int c){
a->*b = c;
}
int main(){
// 输出结果为 1
cout << &Test::c << endl;
}
考研刷题时碰到的一道题中的一部分代码,我知道 Test::是类的作用域,但是这个&Test::c是个什么东西,还有这个int Test::*v[] = {&Test::a, &Test::b, &Test::c}又是一个什么神奇的数组,翻了半天书也没看出个所以然,上网查也不知道用什么关键词,有没有懂的大佬能帮我一下。


