1、const 用法:
const float PI = 3.1415926; // PI为只读变量,使用时必须初始化;
const float PI(3.1415926);//初始化时可使用;
2、sizeof 用法:
int x;
sizeof(short);
sizeof x;
3、位运算:
a = a & 0xfe; //将char型变量a的最低位 置 0;
c = a & 0xff; //有char c;int a;取出a的低字节;
a = a | 0xff; //将int型变量a的低字节 置 1;
01111010 ^ 00001111;//将特定位翻转;
4、类型转换操作符<类型说明符>(表达式):
const_cast; dynamic_cast; reinterpret_cast; static_cast;
来源:CSDN
作者:Kpsle
链接:https://blog.csdn.net/qq_44884204/article/details/104033750