In the life of the C++ programmer, there are 2 major interesting constructor strategies. One of them is for copping an object and the other for moving data. The copy constructor is basic structure which receives a reference of an object. The parameter object must be constant because in the… Continue Reading Copy and Move Constructors
If you using modern C++ in your programing life there are three important concepts in your life to manage methods. If you compose a class without writing your own constructor (or copy constructor), The compiler creates a method for you to overcome basic structures. Of course, it does nothing but… Continue Reading Delete, Default and Delegating Constructors
Before Modern C++ approach (C++11) we initialized our class something like that. But Modern C++ brings us this option. Initializing by using simple curly brackets creates a method which runs before everything includes constructor methods, as a result, we don’t have to do anything for other alternative constructors.