求教c++指针的问题
程序代码:
#include <iostream> using namespace std; void main() { int va1=100,*pva1; float vf1=1.0,*pvf1,*pvf2; int*pva2=NULL; cout<<"value of pva2 is "<<pva2<<endl; pva1=&va1; pvf1=pvf2=&vf1; cout<<pva1<<"\t"<<&va1<<endl; cout<<pvf1<<"\t"<<pvf2<<endl; }本人菜鸟。。。
上面的这个程序最终运行的结果是
value of pva2 is 00000000
0041FBF0 0041FBF0
0041FBD8 0041FBD8
可是书上的结果是
value of pva2 is 0x00000000
0x0012FF7C 0x0012FF7C
0x0012FF74 0x0012FF74
求教下这两组结果为何不同?