Function And Operator Overloading in C++

Google+ Pinterest LinkedIn Tumblr +

Introduction
I believe I have made the learning of C++ easy. If you have been reading my C++ tutorials in the order given, then you should agree with me. C++ is also a very useful language to learn. Would it not be a sweet experience if you understand most, if not all, of C++? Would it not be a sweet experience, if you have C++ in your hands? Continue to read my advanced topics. The next one, which I introduce you to here, is a short series. In this post, I introduce you to a short free tutorial series on “Function and Operator Overloading in C++”. The series forms part of my advanced topics in C++.

It is possible for you to have more than one function that will do several similar things, and all the functions have the same name. That is also applicable to member functions in a class. C++ is a standard language for writing programs. Some of the other languages do not have this feature. Your main program (file) in C++ may end up to be too long and cumbersome, if this feature did not exist. This feature enables you to use certain user-defined functions without worrying too much about their argument types, as long as the arguments are consistent.

In another side of the story, it is possible for you to have more than one operator that will do several similar things, and all the operators have the same identifier name (symbol). That is also applicable to member functions in a class. C++ is a standard language for writing programs. Some of the other languages do not have this feature. Your main program (file) in C++ may end up to be too long and cumbersome, if this feature did not exist. This feature enables you to use certain operators without worrying too much about their operand types, as long as the operands are consistent.

When you redefined a function with the same name, you are said to be overloading the function. When you redefined an operator with the same name (symbol), you are said to be overloading the operator.

The tutorial series I have for you has been written in a step-by-step fashion. The code samples are well formatted with good indentation, making readability very easy. There are no missing special characters, as you would find in other sites. The links to the different parts of the series are easily accessible. Click the following link to start the free series:

http://www.broad-network.com/ChrysanthusForcha/Function-Overloading-in-C++.htm

Chrys

Share.

About Author

Leave A Reply