In this video, Troy gives an in-depth example of using the freely available open source.
- [Narrator] Let's take a look at Cppcheck.…It is an open-source cross-platform static analyzer.…It runs from the command line.…Cppcheck can find array overruns, memory and resource leaks,…unused variables and much more.…Let's check it out in action.…Let's go to Visual Studio Code, and here we have a program…that is design to put Cppcheck through its paces.…It doesn't actually do anything, please don't imitate it,…it's a terrible piece of code…but that's exactly what it's supposed to do.…
So what it has is it has four functions,…use after delete, do on initialize, calc ages,…and it has a main function…that it sort of calls all of these guys.…Again, this program doesn't actually do anything.…Let's go ahead and go to the terminal.…Let us go Cppcheck, dash dash enable, equal all,…and then we go what files do we want to analyze,…so I'm going to say dot forward slash star dot CPP…which is all of the CPP files in this directory.…
Now there's only one, but let's just run it anyways.…And so right off the bat, it finds a bunch of things.…
- Major new C++ features
- Turning on modern C++
- Letting the compiler help
- Using the new features correctly
- Using auto type deduction
- Using lambdas
- Range-based for loops
- How C++ and the Standard Template Library name things
- Making the best of the filesystem library
- Managing objects
Skill Level Beginner
1. What Is Modern C++?
2. Tools That Improve Your Code
3. Using the New Features Correctly
4. Don't Reinvent the Wheel
5. Managing Objects
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.