Classes :- It can be considered as a fundamental block of C++. It is a data type that is user defined that is needed in order to hold it's member function and data members of it's own.
Object :- It can be considered as an instance of any particular class. Memory is only allocated after object is created.
Constructor :- It is used in order to initialize the objects of the class and is termed to be a special kind of member function. It is called automatically whenever object is being created. Also it doesn't include any return type.
3 type of constructor are :-
1) Default Constructor :- It is a kind of constructor that doesn't contain any parameter and also doesn't take any argument.
2) Parameterized Constructor :- It allows passing of arguments. Arguments are used in order to initialize the object after being created.
3) Copy Constructor :- It is used in order to initialize an object with the help of another object of that same class.
Static Data Members :- They are simply member of class that are declared with the keyword "static". It is only visible in that class having lifetime of entire program.
Static Member Functions :- These are the member functions that are being created using the keyword "static". Static function is bounded to access variables or functions that are static of that particular class.
Comments