In C++ and Java, functions can not be overloaded if they differ only in the return type.
For example, the following program C++ and Java programs fail in compilation.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- Function Overloading in C++
- Function Overloading and float in C++
- Function overloading and const keyword
- How to return a local array from a C/C++ function?
- How to return multiple values from a function in C or C++?
- C function argument and return values
- Java Function/Constructor Overloading Puzzle
- Function Overloading vs Function Overriding in C++
- Primitive data type vs. Object data type in Java with Examples
- Overloading in Java
- Operator Overloading in C++
- Constructor Overloading in C++
- What does main() return in C and C++?
- Overloading New and Delete operator in c++
- C++ | Operator Overloading | Question 10