reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Function overloading - C++ [1/1]

Type:
Function overloading - C++
Level: Expert reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia 
Function overloading - C++
Date: 2006-Dec-08
Function overloading - C++
Visited: 9688 times
Function overloading - C++
Rating: Function overloading - C++
Function overloading - C++
Author: Alex Plumpton
This tutorial will explain function overloading.
In function overloading, the function is said to be overloaded when same name is given to different functions. However, the functions will differ at least in any one of the these. The number of parameters, the data type of parameters, the order of appearance these three together are referred to as the function signature. While overloading a function, the return types of the function need not differ.

1. Functions differ in function signature.
2. Return types of functions need not differ.
Means to Learn

Function overloading - C++
The code depicts function overloading. There are two functions with the same name calc. In the main function, when the function calc is invoked using the object a, depending up on the type and number of parameters, the compiler binds the call to the function. Hence, when calc(5) is called, the compiler checks for the function matching the parameter type. So calc(int num l) will be invoked and parameter will be passed to the function at runtime and output displayed. Similarly, when calc(6,7) is called, it looks for the same function with two integers as parameter and bind the respective function to the call.
Means to Learn

Rate this tutorial:                    
reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia - Function overloading - C++ [1/1] - reference, tutorial, tutorials, help, example, photoshop, html, php, mysql, 3d software, internet, graphics, programming, multimedia

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: function overloading calling a function from the same function with different signature C++  what is function overloading in c++ and give example of a function overloading  function return type+function overloading+c++  function overloading and Operator overloading in c++  , function overloading and operator overloading in c++  function overloading in main function   function signature function overloading  function overloading different function type  function overloading c++  function overloading in c++  function overloading  C++ function overloading  "Function Overloading in C++"  function overloading + c++  C++ function overloading   function overloading in C++  function overloading+c++  function overloading, c++  how to use function overloading  Overloading a Function Name c++