#include <iostream>
using namespace std;
int main() {
int age = 10;
int &refage = age;//定义了age的引用,refage相当于age的别名
refage = 20;
cout << age << endl;
getchar();
return 0;
}
引用弱化的指针
#include <iostream>
using namespace std;
int main() {
int age = 10;
int &refage = age;//定义了age的引用,refage相当于age的别名
refage = 20;
cout << age << endl;
getchar();
return 0;
}
引用弱化的指针