Senior Dogsbody Engineer  
06 2023 档案
  • C/C++ 四种类型转换
    摘要:1. 去常转换 const_cast 把常量指针或引用转换为非常量指针或引用,或者反之,并仍然指向原来的对象。强制转换类型必须是指针或引用。 const int a = 10; const int &b = 20; int& ra = const_cast<int&> (a); // 把常量引用转换 阅读全文
    posted @ 2023-06-09 10:42 高级打杂工程师 阅读(44) 评论(0) 推荐(0) 编辑

 
点击右上角即可分享
微信分享提示