5.0
Beginner
2h
Secure Coding Practices in C++: A Deep Dive into const
Gain insights into the C++ keyword 'const,' its usage in various contexts, and implications when returning pointers and references. Learn about preventing accidental data changes.
In this course, you will learn about the C++ keyword const and its behaviour under different usage conditions, including local, global and static contexts. This course will help you to understand const and its implications when you attempt to return pointers and references in C++. By the end of the course, you will have a solid grip on const and its usage in preventing any accidental change of data.
In this course, you will learn about the C++ keyword const and its behaviour under different usage conditions, including local, ...Show More
WHAT YOU'LL LEARN
Use of const with variables
Effect of const on functions and return types
Const with parameters
Relation between const and smart pointers
Use of const with variables
Show more
Content
2.
Arguments using const
6 Lessons
Get started with using const in arguments to enhance clarity, performance, and code robustness.
3.
Local Variables
3 Lessons
Work your way through const local variables to enhance immutability and code clarity.
4.
Local Members
8 Lessons
Break down complex ideas about using `const` with member variables in C++ classes.
5.
Functions
6 Lessons
Take a closer look at const functions, overloads, key takeaways, and practical exercises for secure coding in C++.
6.
Return Types
7 Lessons
Follow the process of managing const return types to avoid performance and safety issues.
7.
const Parameters
6 Lessons
Maximize code clarity and safety with const in function parameters, avoiding unintentional modifications in C++.
8.
const and Smart Pointers
4 Lessons
Get familiar with using `const` with smart pointers to enhance C++ coding practices.
9.
Rvalue References
7 Lessons
Discover the logic behind const rvalue references, key binding rules, and their practical usages.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Course Author:
Developed by MAANG Engineers
Trusted by 2.8 million developers working at companies
"These are high-quality courses. Trust me. I own around 10 and the price is worth it for the content quality. EducativeInc came at the right time in my career. I'm understanding topics better than with any book or online video tutorial I've done. Truly made for developers. Thanks"
Anthony Walker
@_webarchitect_
"Just finished my first full #ML course: Machine learning for Software Engineers from Educative, Inc. ... Highly recommend!"
Evan Dunbar
ML Engineer
"You guys are the gold standard of crash-courses... Narrow enough that it doesn't need years of study or a full blown book to get the gist, but broad enough that an afternoon of Googling doesn't cut it."
Software Developer
Carlos Matias La Borde
"I spend my days and nights on Educative. It is indispensable. It is such a unique and reader-friendly site"
Souvik Kundu
Front-end Developer
"Your courses are simply awesome, the depth they go into and the breadth of coverage is so good that I don't have to refer to 10 different websites looking for interview topics and content."
Vinay Krishnaiah
Software Developer
Hands-on Learning Powered by AI
See how Educative uses AI to make your learning more immersive than ever before.
AI Prompt
Code Feedback
Explain with AI
AI Code Mentor
Free Resources