f0315.cpp
资源名称:c.rar [点击查看]
上传用户:puke2000
上传日期:2022-07-25
资源大小:912k
文件大小:0k
源码类别:
C#编程
开发平台:
Visual C++
- //=====================================
- // f0315.cpp
- // 引用及其地址
- //=====================================
- #include<iostream>
- using namespace std;
- //-------------------------------------
- int main(){
- int int1 = 5;
- int& rInt = int1;
- cout<<"&int1: "<<&int1<<" int1: "<<int1<<endl;
- cout<<"&rInt: "<<&rInt<<" rInt: "<<rInt<<endl;
- int int2 = 8;
- rInt = int2;
- cout<<"&rInt: "<<&rInt<<" rInt: "<<rInt<<endl;
- }//====================================