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

后端 未结 4 1531
一生所求
一生所求 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:07

    Unfortunately there isn't a compiler warning in Visual C++ that points out these casts (at least not one that I know of), although it looks like PC-Lint does provide a warning/note that warns you if you use an old-style cast. Depends if you're willing to spend the money on PC-Lint - in my opinion it's definitely worth for all the issues you can find with it...

提交回复
热议问题