i want a program codings for function overloading...?can u help me........
please pick any c++ book and you will find the code .
The idea of overloading is so that the same name for more than one function in a class. Here is an example.
Once defined you can call them
- EditContact() //no argument might prompt for everything
- EditContact(int phone)
- EditContact(string name)
- EditContact(int phone, string name)
All the above functions have the same name, but are different because they take different arguments. So using the above as reference:
- EditContact(5555555555) would call 2 from above.
- EditContact(5555555555, "Billy Mays") would call 4 from above.
...and etc. Overloading is done behind the scene and the compiler knows which one to use.