#include <iostream>
#include <Windows.h>
using namespace std;
void Change1(int*& a, int*& b) {
int* tmp = a;
a = b;
b = tmp;
}
int main() {
int a = 6, b = 221;
int *p = &a, *q = &b;
cout << "交换前:" << endl;
cout << "p=" << p << ",q=" << q << endl;
cout << "p所指的值:" << *p << ",q所指的指:" << *q << endl;
Change1(p, q);
cout << "交换后:" << endl;
cout << "p=" << p << ",q=" << q << endl;
cout << "p所指的值:" << *p << ",q所指的指:" << *q << endl;
}