#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; }
标签:std,10,内存地址,int,main,指针 From: https://www.cnblogs.com/As10016/p/17793697.html