各位看看这是什么问题
#include<iostream>using namespace std;
int main()
{
int i;
int *p=0;
cout<<"i的内存地址:"<<&i<<endl;
cout<<"p的内存地址:"<<p<<endl;
i=5;
*p=i;
cout<<"i的内存地址:"<<&i<<endl;
cout<<"p的内存地址:"<<p<<endl;
*p=30;
cout<<"i的值:"<<endl;
cout<<"i的内存地址:"<<&i<<endl;
cout<<"p的内存地址:"<<p<<endl;
cout<<"p的值:"<<*p<<endl;
return 0;
}
没有报错,但运行结果怎么不对呀