From the course: C++ Best Practices for Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
const is your friend - C++ Tutorial
From the course: C++ Best Practices for Developers
const is your friend
“
- [Narrator] Const is your friend. Any variable which is not going to change should be made const. It helps the compiler, makes your intentions clear, can result in less bugs and cleaner code, and you might even get a performance boost. Best practices: make every variable you can const.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.