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

const is your friend - C++ Tutorial

From the course: C++ Best Practices for Developers

Start my 1-month free trial

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.

Contents