OOP in C++: Copy Constructors, Nested Classes, & Namespaces
C++ 20
| Intermediate
- 13 videos | 1h 42m 57s
- Includes Assessment
- Earns a Badge
A copy constructor in C++ classes is a specialized method used to create an object from another object of the same class. Other specialized C++ methods include nested classes and namespaces, which organize different classes in a logical and coherent manner while avoiding name conflicts. In this course, learn how to specify and use a copy constructor. Next, discover how classes and functions can be marked as friends. Finally, examine how nested classes can be defined and used in C++ and practice using namespaces to modularize your code. After completion of the course, you'll be able to create and implement a custom copy constructor, access private variables using friend functions and classes, and store functions and classes in namespaces.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this coursecreate copies of objects using C++'s default copy constructorimplement a custom copy constructoruse pass-by-value and pass-by-reference semantics with objectscreate a copy of an object containing pointersidentify the errors that can result from using the default copy constructorimplement copy constructors for a class containing pointers
-
access private variables using friend functions and classescreate private and public nested classesidentify and use the global namespacestore functions and classes in namespacescreate and reference namespacessummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 7sUP NEXT
-
2.Creating Copies Using a Copy Constructor8m 23s
-
3.Implementing Copy Constructors7m 29s
-
4.Using Pass-by-value and Reference with Objects6m 44s
-
5.Creating Required Copy Constructors7m 45s
-
6.Identifying Default Copy Constructor Errors9m 16s
-
7.Implementing Copy Constructors for Object Pointers5m 22s
-
8.Creating Friend Functions and Classes11m 10s
-
9.Creating Nested Classes10m 59s
-
10.Implementing Namespaces8m 14s
-
11.Storing Functions and Classes in Namespaces10m 54s
-
12.Creating and Referencing Namespaces11m 15s
-
13.Course Summary3m 20s
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.