C ++代码分析工具 [英] C++ code analysis tools

查看:131
本文介绍了C ++代码分析工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在学习C ++,因为我还在学习,我一直在犯错误。

使用C ++作为一种允许的语言,它通常需要很长时间弄清楚出了什么问题 - 因为编译器让我很多东西。我意识到这种灵活性是C ++的主要优势之一,但是它使得难以学习基本语言。

有一些工具可以用来分析我的代码,并根据最佳做法提出建议只是敏感的编码?

I'm currently in the process of learning C++, and because I'm still learning, I keep making mistakes.
With a language as permissive as C++, it often takes a long time to figure out exactly what's wrong -- because the compiler lets me get away with a lot. I realize that this flexibility is one of C++'s major strengths, but it makes it difficult to learn the basic language.
Is there some tool I can use to analyze my code and make suggestions based on best practices or just sensible coding? Preferably as an Eclipse plugin or linux application.

推荐答案

启用最大编译器警告(即 -Wall 选项,如果你使用Gnu编译器)。

Enable maximum compiler warnings (that's the -Wall option if you're using the Gnu compiler).

'Lint'是原型的静态分析工具。

'Lint' is the archetypical static analysis tool.

valgrind 是一个良好的运行时分析器。

valgrind is a good run-time analyzer.

这篇关于C ++代码分析工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆