Question Locked

Function Overloading in C++

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Here in this article - https://www.scaler.com/topics/difference-between-function-overloading-and-overriding-in-cpp/#function-overloading-in-c++ it says C++ allows function overloading then lets say if we have a function area(int l) and area(float f) then will my code work?

1 reply

by kees_b

Assuming your code calls an area function (you forgot to provide the code) it depends on where you have that function (or should I say: those 2 functions?) Better read the whole article.
And it won't harm at all to try.

Best of luck with your study of software engineering.

This discussion is closed to new replies.