void change(int *p){*p = 100;}void change2(int **p){*p = new int(200);}void change3(int *&p){p = new int(300);}int main()
{int a = 1;
int *b = new int(2);change(&a); // a = 100
change(b); //*b = 100
cout<<a<<' '<<*b<<endl;delete b;
b = NULL;change2(&b);//*b = 200
cout<<a<<' '<<*b<<endl;delete b;
b = NULL;change3(b); //*b = 300
cout<<a<<' '<<*b<<endl;delete b;
b = NULL;return 1;
}