createreference.cpp
来自「《24学时精通c++》的光盘内容」· C++ 代码 · 共 19 行
CPP
19 行
//Listing 11.1
// Creating and Using References
#include <iostream>
int main()
{
int intOne;
int &rSomeRef = intOne;
intOne = 5;
std::cout << "intOne: " << intOne << std::endl;
std::cout << "rSomeRef: " << rSomeRef << std::endl;
rSomeRef = 7;
std::cout << "intOne: " << intOne << std::endl;
std::cout << "rSomeRef: " << rSomeRef << std::endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?