#include <iostream> using namespace std; int main(){ int a=10; int *p;//声明指针 p=&a;//将指针p指向变量a的内存地址 cout<<"a的值"<<a<<endl; cout<<"a的内存地址"<<p<<endl; *p=300; cout<<"a的值"<<a<<endl; cout<<"指针p指向的内存地址的值"<<*p; }