How to find (and replace) all old C-style data type casts in my C++ source code?

后端 未结 4 1503
一生所求
一生所求 2020-12-10 10:55

How can I locate all old C-style cast in my source?

I\'m using Visual Studio, may be there is some compiler warning that I have to enable?

4条回答
  •  [愿得一人]
    2020-12-10 11:19

    I don't know of a compiler switch that reports these, or anything else built-in in Visual Studio.

    However, here is a Perl script that will search your source tree and find all of the C style casts in your source. It works fairly well for tracking them down.

提交回复
热议问题