横线处补充一行代码,使程序在执行时,在屏幕输出10
Class X
{
int a;
int b;
public : int getB(){
return B;
}
};
int main()
X x;
*((int*)&x + 1) = 10;
cout << x.getB() << endl;