#include <iostream>
using namespace std;
int main(){
int a=10;
int * p; /*指针定义的语法: 数据类型 * 指针变量名*/
p= &a; /*让指针记录变量a的地址*/
cout << "a的地址为(整数型)"<<(int)&a<<endl;
cout << "a的地址为:"<<&a<<endl;
cout << "指针p为:"<<p<<endl;
cout << "p指向的数据为:"<<*p<<endl;
*p=1000;
cout << "此时,p指向的数据为:"<<*p<<endl;
cout << "此时,a的值为:"<<*p<<endl;
system("pause");
return 0;
}