码迷,mamicode.com
首页 > 其他好文 > 详细

自考新教材--p40

时间:2019-12-02 11:46:44      阅读:83      评论:0      收藏:0      [点我收藏+]

标签:names   jin   turn   ace   ons   include   cout   tab   hint   

源程序:   各种数据类型的转换

#include <iostream>

using namespace std;

int main()

{

const int cInt = 30;

int oneInt = 50;

int &ref = oneInt;

const int &rc1 = cInt;

const int &rc2 = oneInt;

const int &rc3 = ref;

int dInt = ref;

int eInt = cInt;

int fInt = rc1;

const int gInt = oneInt;

int &ref1 = ref;

const int hInt = ref;

const int jInt = cInt;

const int &mInt = rc1;

const int nInt = rc2;

cout << "OK" << endl;

int &r2 = (int &)rc1;

int &r3 = (int &)cInt;

system("pause");

return 0;

}

自考新教材--p40

标签:names   jin   turn   ace   ons   include   cout   tab   hint   

原文地址:https://www.cnblogs.com/duanqibo/p/11969614.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!