Defensive C++: Writing Defensive C++ Code
C++
| Intermediate
- 12 videos | 1h 34m 33s
- Includes Assessment
- Earns a Badge
Writing good, robust, and maintainable C++ code involves understanding the intricacies of the language and avoiding common pitfalls. Use this course to learn more about avoiding fatal coding errors, adopting defensive coding techniques, and following best practices and other code niceties Examine some common coding errors, the correct way to set up constructors in code, and the pitfalls of overriding non-virtual functions. You will also explore object slicing errors, how to cast objects to other types, and the use of smart pointers to manage resources in C++. Finally, you will understand the implications of the static initialization order fiasco in C++ and how you can avoid it. At the end of this course, you will have the knowledge and skills to write robust, defensive C++ code.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseWrite c++ code incorporating defensive techniquesSpecify constructors that leave your object in a valid stateUse the const keyword early and often to identify methods that don't update member variablesOverride virtual functions to take advantage of runtime polymorphismIdentify situations where object slicing is likely to occur
-
Use the right type of cast for your use caseUse the right type of cast when you need additional checksManage memory correctly even when exceptions occur in codeWrite code to avoid the static initialization order fiascoUse the right technique to access elements of a collectionSummarize the key concepts covered in this course
IN THIS COURSE
-
1m 42s
-
7m 6s
-
11m 4s
-
8m 41s
-
9m 34s
-
10m 31s
-
10m 26s
-
3m 30s
-
11m 57s
-
12m 6s
-
6m 14s
-
1m 43s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.