OOP in C++: Using Static Members & Destructors

C++    |    Intermediate
  • 9 videos | 55m 58s
  • Includes Assessment
  • Earns a Badge
Rating 4.4 of 9 users Rating 4.4 of 9 users (9)
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 course
    Create static variables using the pre-c++17 format
    Differentiate between the old and new c++ syntax for creating static variables
    Access static variables using the scope resolution operator
    Define and invoke static functions
  • Define and use object destructors
    Implement constructors and destructors with free store memory
    Instantiate and deallocate a pointer in constructors and destructors
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 1m 59s
  • 7m 22s
  • Locked
    3.  Creating C++17 Static Variables
    5m 45s
  • Locked
    4.  Accessing Static Variables through Classes
    7m 27s
  • Locked
    5.  Defining and Invoking Static Functions
    8m 58s
  • Locked
    6.  Defining and Using Destructors
    7m 50s
  • Locked
    7.  Implementing Constructors and Destructors
    6m 17s
  • Locked
    8.  Instantiating and Deallocating a Pointer
    7m 52s
  • Locked
    9.  Course Summary
    2m 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.

YOU MIGHT ALSO LIKE

Rating 4.1 of 10 users Rating 4.1 of 10 users (10)
Rating 4.4 of 11 users Rating 4.4 of 11 users (11)
Rating 4.7 of 7 users Rating 4.7 of 7 users (7)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.4 of 8 users Rating 4.4 of 8 users (8)
Rating 4.5 of 53 users Rating 4.5 of 53 users (53)
Rating 4.7 of 14 users Rating 4.7 of 14 users (14)