K
K
kraz123452019-03-22 11:42:15
C++ / C#
kraz12345, 2019-03-22 11:42:15

What is the difference between function overloading and operator overloading?

What is the difference between function overloading and operator overloading?
And can you please give an example of function overloading.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2019-03-22
@res2001

No difference.
Operators are a special case of a function, only with signatures strictly defined and described in the standard and with a specific keyword operator. Well, the difference in usage is that, as a rule, the compiler inserts operator calls into the code itself, and the programmer explicitly calls the functions. From the point of view of the overload, there is no difference.
UPD: additionally see Evgeny Shatunov 's comment

V
Vitaly, 2019-03-22
@vt4a2h

There is no second definition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question