C++
Koyurion
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++ 查看变量数据类型之 typeid().name()
1,使用前先导入库 #include<typeinfo> 2. 设data为变量数据 typeid(data).name() 3.返回值 bool: b char: c signed char: a unsigned char: h (si...原创 2019-01-11 20:05:05 · 6021 阅读 · 0 评论 -
区别:符号变量和常变量
符号变量: 1.用 #define指令定义 #define PRICE 35 2.符号变量只是用一个符号代替字符串,在预编译时把所有符号变量替换为所制定的字符串 3.没有类型,在内存中并不存在以符号变量命名的存储单元 常变量: 1.用const定义 const int b=45; 2.具有变量的特征 3.具有类型,在内存中存在以它命名的存储单元 ...原创 2019-01-11 20:27:10 · 5574 阅读 · 0 评论 -
实例: C++混合运算之类型转换
高 double ⬅ float ⬆ long ⬆ unsigned 低 int ⬅ char、short int a=1,b=2; char ch1='a',ch2='b'; short s1=3,s2=5; long l1=100; cout<<"int + int "<<a+b...原创 2019-01-11 20:44:51 · 773 阅读 · 0 评论
分享