c++强制类型转换

来源:互联网 发布:怎样判断两个矩阵相似 编辑:程序博客网 时间:2024/04/29 16:54
  • const_cast removes const, volatile or __unaligned attributes
  • dynamic_cast must be transforming into a pointer or a reference to a class, or void pointer
  • static_cast is for transforming into a superclass pointer or reference, or between non-class (i.e., basic data) types or void pointers
  • reinterpret_cast can be used for everything 
  • 原创粉丝点击