Passing parameters by references:修订历史

本页内容

差异选择:选中要对比的版本的单选按钮,按Enter键或下方的按钮。
说明:(当前)=与最后版本之间的差异,(之前)=与上一版本之间的差异,=小编辑。

    2022年8月17日 (星期三)

    • 当前之前 19:432022年8月17日 (三) 19:43Neo 讨论 贡献 1,161字节 +1,161 创建页面,内容为“{{DISPLAYTITLE:把引用作为参数}}1 = C++ 把引用作为参数 = C++ 引用 我们已经讨论了如何使用指针来实现引用调用函数。下面的实例使用了引用来实现引用调用函数。 <sample title="" desc="" lang="c" hererun="1"> #include <iostream> using namespace std; // 函数声明 void swap(int& x, int& y); int main () { // 局部变量声明 int a = 100; int b = 200;…”