C++强制类型转换

不要使用旧式转换,如(type id) value这种格式

基本类型转换(不包括指针)通过 static_cast<type id> value

不同类型的指针变量的转换  通过 reinterpret_cast<type id*> ptr


你可能感兴趣的:(C++)