【c++】引用

引用是一种复合类型,通过在变量名前添加“&”符号来定义。

引用只是对象的另一个名字

int iVal = 1024;
int &refVal = iVal;
refVal++;
cout << iVal  << endl; //1025

const引用

const int iVal = 1024;
const int &refVal = iVal;
原文地址:https://www.cnblogs.com/KMould/p/15155258.html