#include <iostream>
using namespace std;ios
int main(){
int a= 10; //定義變量a
int * p ; //定義個指針P
p = &a; //指針P 等於a的地址
int * o; //定義指針 o
o = &a; //指針o等於 a的地址
cout << "a 的地址爲:" << &a<< endl;
cout << "p 的地址爲:" << p << endl;
cout << "o 的地址爲:" << o << endl;
* p = 1000; //指針p 裏的值等於 1000
cout << "a =" <<a <<endl;
cout << "*p = "<< *p << endl;
return 0;
}spa