为什么我的指针地址相差12个字节?
请问一下:为什么我的VC2010++本地C++(Win7)
#include<iostream>
using std::cout;
using std::endl;
using std::hex;
int main()
{
int number1 (55), number2 (99) , number3 (10);
int* pnumber (nullptr);
pnumber = &number1;
cout << "number1 address = " << pnumber << endl;
pnumber = &number2;
cout << "number2 address = " << pnumber << endl;
pnumber = &number3;
cout << "number3 address = " << pnumber << endl;
return 0;
}
运行结果指针地址总是相差12字节,为什么?谢谢。
是巧合吗,还是什么原因?
我更改过,也增加过,还是一样相差12字节。