saving . . . saved return type has been deleted. return type has been hidden .
return type
Title
Question
During function overloading ,
Why the return type of the functions(that are overloaded) must be same?

in other books we had read that
overloading functions should have
1) same name(functions should exist in same class)
2)either the parameter type should be different  or the no. of parameters should be different .

NOTHING ABOUT FUNCTIONS  RETURN TYPE.

Advanced-C++ Function-Overloading-And-Overriding 07-08 min 0-10 sec 20-03-14, 7:34 p.m. vikas_kumar

Answers:

In the tutorial it is mentioned that the return type is same in function overriding,
and not function overloading.
21-03-14, 2:23 a.m. pratham920


Hi,

Kindly go through the tutorial again.
It is mentioned that, in function overloading the arguments and the data-type of the arguments will be different.
And in function overriding the return-type is same.
21-03-14, 11:56 a.m. Ashwini


Log-in to answer to this question.