![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Koyurion
这个作者很懒,什么都没留下…
展开
-
C++ 查看变量数据类型之 typeid().name()
1,使用前先导入库#include<typeinfo>2. 设data为变量数据typeid(data).name()3.返回值bool: bchar: csigned char: aunsigned char: h(si...原创 2019-01-11 20:05:05 · 5645 阅读 · 0 评论 -
区别:符号变量和常变量
符号变量:1.用 #define指令定义 #define PRICE 352.符号变量只是用一个符号代替字符串,在预编译时把所有符号变量替换为所制定的字符串3.没有类型,在内存中并不存在以符号变量命名的存储单元常变量:1.用const定义const int b=45;2.具有变量的特征3.具有类型,在内存中存在以它命名的存储单元 ...原创 2019-01-11 20:27:10 · 5363 阅读 · 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 · 676 阅读 · 0 评论