This is a discussion on Difference between function overloading and operator overloading within the C and C++ Programming forums, part of the Software Development category; Difference between function overloading and operator overloading: Function overloading is the practice of declaring the same function with different signatures. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Difference between function overloading and operator overloading: 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. On the other hand operator overloading is: Operating overloading allows you to pass different variable types to the same function and produce different results. In this article Ben gives us the low-down on operator overloading in C++.Operator overloading is common-place among many efficient C++ programmers. It allows you to use the same function name, but as different functions. - Vignesh ![]() |
| Sponsored Links |
| |||
| Hi, Function Overloading In one program,u can use the same function name but with different parameters.This is known as overloading a function. For eg; class one { void show() { cout<<"This is from Show() function without arguments; } void show(int a) { cout<<a<<" is the argument passed to show()"; } } void main() { one o1; o1.show(); o1.show(5); } In Operator Overloading, U are going to overload only the operator not the function name.The operator is not repeated.Instead it gives different meaning..I will explain this later.. |
| |||
| fuction overloading:-C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. |
| |||
| Function overloading (also polymorphisms or method overloading) is a programming concept that allows programmers to define two or more functions with the same name. Operator overloading is the ability to tell the compiler how to perform a certain operation when its corresponding operator is used on one or more variables. |
| |||
| Nice work guys. The function overloading had me thinking of the same thing. It's now clearer. This is a great thread started. Thanks to the guys.... cheers... Software Discounts /Travel Promo Codes |
| |||
| Hi Thanks guy's for this .I really confuse about this concept. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Does Python supports Function Overloading? | Arun | Python | 2 | 08-14-2007 04:46 AM |
| What is the difference between “overloading” and “overridding”? | Arun | C and C++ Programming | 1 | 07-20-2007 06:46 AM |
| What is the difference between “overloading” and “overridding”? | prasath | C and C++ Programming | 2 | 07-17-2007 08:12 AM |
| Does Python supports Operator Overloading? | vadivelanvaidyanathan | Python | 1 | 07-17-2007 02:10 AM |
| Operator overloading in C++ | prasath | C and C++ Programming | 1 | 07-16-2007 05:51 AM |