How to find (and replace) all old C-style data type casts in my C++ source code?(如何在我的 C++ 源代码中查找(和替换)所有旧的 C 风格数据类型转换?)
问题描述
如何在我的源代码中找到所有旧的 C 风格类型转换?
How can I locate all old C-style cast in my source?
我正在使用 Visual Studio,可能有一些编译器警告我必须启用?
I'm using Visual Studio, may be there is some compiler warning that I have to enable?
推荐答案
GCC 有选项 -Wold-style-cast
,它会在发现任何 C 风格的强制转换时警告你.
GCC has the option -Wold-style-cast
which will warn you if it finds any C-style casts.
这篇关于如何在我的 C++ 源代码中查找(和替换)所有旧的 C 风格数据类型转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在我的 C++ 源代码中查找(和替换)所有旧的 C 风格数据类型转换?


- 与 int by int 相比,为什么执行 float by float 矩阵乘法更快? 2021-01-01
- 近似搜索的工作原理 2021-01-01
- STL 中有 dereference_iterator 吗? 2022-01-01
- C++ 协变模板 2021-01-01
- 静态初始化顺序失败 2022-01-01
- 从python回调到c++的选项 2022-11-16
- Stroustrup 的 Simple_window.h 2022-01-01
- 如何对自定义类的向量使用std::find()? 2022-11-07
- 使用/clr 时出现 LNK2022 错误 2022-01-01
- 一起使用 MPI 和 OpenCV 时出现分段错误 2022-01-01