int dog, cat, bird, fish;
void f(int pet)
{
cout << "pet id number" << pet << endl;
}
int _tmain(int argc, _TCHAR* argv[])
{
cout << "f(): " << (long)&f << endl;
cout << "dog: " << (long)&dog << endl;
cout << "cat: " << (long)&cat << endl;
cout << "bird: " << (long)&bird << endl;
cout << "fish: " << (long)&fish << endl;
int i;
int j;
int k;
cout << "i: " << (long)&i << endl;
cout << "j: " << (long)&j << endl;
cout << "k: " << (long)&k << endl;
return 0;
}
以上程序
在vc6 输出为:
在vc2005输出为
为什么VC6间隔是4 而2005 好像为12 又好像没有规律哦。
哪位能够解释下吗?