What is Function Overloading

What is Function Overloading

Rajesh kumar
Views: 1576 | Community Opinion: 2

Tags..  object oriented programming

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 

Function overloading is the practice of declaring the same function with different signatures. The same function name will be used with different number of parameters and parameters of different type. But overloading of functions with different return types are not allowed. Like

void f(char c, int i);
void f(int i, char c);
void f(string & s);


For example, a print function that takes a string (or char *) argument performs very different tasks than one that takes an argument of type double. Overloading permits uniform naming and prevents programmers from having to invent names such as print_sz or print_d.


Function Declaration Element used for Overloading?

Function return type - No

Number of arguments - Yes

Type of arguments - Yes

Presence or absence of ellipsis - Yes

Use of typedef names - No

Unspecified array bounds - No

const or volatile - Yes




replica watches Said..

replica cartier watches are costly little question, however they are only a small fraction of the price of the unique Cartier. No, it isn't Swiss. Cartier is a French jeweler and maker of luxurious merchandise and accessories. They are finest known as jewelers and their RePLica WaTCHes are certainly jewels - extremely-luxurious timepieces created using essentially the most treasured metals and best gems. Cartier has been generally known as jeweler to kings, king of jewelers? They've a royal warrant, that is, they are the designated jewelers for the British royal family. It is a uncommon distinction for a jeweler. But the British royal family is not the only royal family they serve. Similar warrants have been obtained from royalty in Egypt, Romania, Serbia, Belgium, Serbia, Greece, Siam, Monaco, Russia, Portugal and Spain. By now, anyone studying this will need to have gauged simply how costly and unique Cartier is. Hence the need for replica Cartier watches!






What do you think? Add your opinion/answer
*Name
*your opinion/answer: