What is function overloading and operator overloading?
What is function overloading and operator overloading?Function overloading :
A feature in C++ that enables several functions of the same name can be defined with different types of parameters or different number of parameters. This feature is called function overloading. The appropriate function will be identified by the compiler by examining the number or the types of parameters / arguments in the overloaded function. Function overloading reduces the investment of different function names and used to perform similar functionality by more than one function.
Operator overloading :
A feature in C++ that enables the redefinition of operators. This feature operates on user defined objects. All overloaded operators provides syntactic sugar for function calls that are equivalent. Without adding to / changing the fundamental language changes, operator overloading provides a pleasant façade.
What is function overloading in C++?- You can have multiple functions with same name using function overloading facility of C++. You can use same name for multiple functions when all these functions are doing same thing.
What is operator overloading in C++?- With this facility in C++, you can give additional meaning to operators.
Use of this pointer
Explain the use of this pointer - The this keyword is used to represent an object that invokes the member function...
What is a smart pointer?
What is a smart pointer? - Smart pointers are objects which store pointers to dynamically allocated (heap) objects..