Lesson 11 - Copy Constructors in C++
In the previous lesson, Overloading operators in C++, we explained operator overloading. In today's C++ tutorial, we're going to look at another type of constructors - the copy constructor. But don't worry, we didn't learn operators for nothing. The next C++ tutorial will focus on one of them - the assignment operator.
What's a copy constructor? As the name suggests, it's a constructor - so it's used to create new instances as we know from past lessons. And we call it the copy constructor because it's being used when the instance is being copied. And as we already know, the instance is copied every time we
...End of the preview...
You've come here and that's great! We believe that the first lessons showed you something new and useful
Do you want to continue the course? Go to the premium section.
- Unlimited and permanent access to individual lessons.
- High quality IT knowledge.
- Skills to help you get your dream and well-paid job.
Requested article covers this content:
In this C++ tutorial, we'll talk about copy constructors, what are they for and how to implement them properly.
You gain points by supporting our network. This is done by sending a helpful amount of money to support the site, or by creating content for the network.