virtual keyword on multiple base class creates one and only copy
Virtual is a keyword to declare that the method must be override If all method is virtual and equals 0, the class runs as an interface. Override keywords shows that the virtual method has been overridden. The shared pointer is the smart pointer way to declare a variable as a… Continue Reading All Virtual Methods Are Abstract in CPP
using keyword is the new way to implement a constructor to the child class.
If you set a list to an abject (or on auto keyword). CPP compiler assumes that the type of variable is initializer_list
Constexpr is a new keyword for a C++ developer. Normally Const returns constant but in runtime. Constexpr generally is used in front of a function. The function should be able to calculate in compile time. These functions must return void or a primitive or primitive reference.
Here is the short note Enum class a new type, It is, of course, an enum bat using namespace. Type is the variable is char in here and the value of a type declared as “a” in here.
There are two types of smart pointers. The unique pointer is a standard method which came from C++11 implementation that returns a pointer. A unique pointer does not to be shared by other parts of the code. To use any of smart pointer you have to include the memory header… Continue Reading Smart pointers
My short notes for casting in C++ Static Cast Checks in compile time that the types of the casing is possible and correct Reinterpret Cast Allows casting in different types. Even if the types are not related. But it does not cause disqualifiers Const Cast Constantly convert two types of… Continue Reading Cast in C++
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