首页 > 其他 > 详细

例1-4 p39

时间:2020-12-28 14:29:22      阅读:29      评论:0      收藏:0      [点我收藏+]

#include<iostream>
using namespace std;
int main()
{
int oneInt =1;
int & ref=oneInt;
const int &refc=oneInt;
ref=2;
cout<<"oneInt="<<oneInt<<","<<"ref="<<ref<<endl;
cout<<"refc="<<refc<<endl;
oneInt=3;
cout<<"refc="<<refc<<endl;
int & ref2=ref;
cout<<"ref2="<<ref2<<endl;
//refc=5;
return 0;
}

例1-4 p39

原文:https://www.cnblogs.com/liushuiyi/p/14201000.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!