Sometimes, I felt method overloading may create confusion.
class a {
public:
void copy(float f);
void copy(double d);
};
a me;
me.copy(1.2); // Not obvious at the first sight on which version we are calling.
A workaround on this is.
class a {
public:
void copyFloat(float f);
void copyDouble(double d);
};
However, having method with different name, to perform same functionality doesn't seem a good idea as well. May I know, what do you consider, to choose among method overloading, or method with different naming?