OOP in C++: Using Static Members & Destructors
C++ 20
| Intermediate
- 9 videos | 55m 58s
- Includes Assessment
- Earns a Badge
Static means something different in C++ compared to C. In C, static refers to a storage class for storing specific types of variables. In C++, static refers to member functions and variables associated with the entire class. In this course, learn how to mark a member variable within a class as static, initialize a static member variable, and access it from methods within and outside the class. Next, discover how static member functions can be used for class-level behavior. Finally, learn how to define and use a destructor. After completion of the course, you'll be able to create and use static variables, access them using the scope resolution operator, and instantiate and deallocate a pointer in constructors and destructors.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this coursecreate static variables using the pre-C++17 formatdifferentiate between the old and new C++ syntax for creating static variablesaccess static variables using the scope resolution operatordefine and invoke static functions
-
define and use object destructorsimplement constructors and destructors with free store memoryinstantiate and deallocate a pointer in constructors and destructorssummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview1m 59sUP NEXT
-
2.Creating Pre-C++17 Static Variables7m 22s
-
3.Creating C++17 Static Variables5m 45s
-
4.Accessing Static Variables through Classes7m 27s
-
5.Defining and Invoking Static Functions8m 58s
-
6.Defining and Using Destructors7m 50s
-
7.Implementing Constructors and Destructors6m 17s
-
8.Instantiating and Deallocating a Pointer7m 52s
-
9.Course Summary2m 28s
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.