c++ 问题
#include<iostream>#include<stdlib.h>
using namespace std;
int var01=1;
int main(void)
{
int var02=2;
int *p;
p=(int *)malloc(sizeof(int));
cout<<"global var01:"<<&var01<<endl;
cout<<"local var02:"<<&var02<<endl;
cout<<"malloc():"<<(void *)p<<endl;
free(p);
return 0;
}
请问这程序打印出的地址malloc():003A56E8怎么跟调试时地址0x003a5c70 怎么不相等啊!
谢谢!