Hi guys. I recently studied C / C++ Coding Standards book.
//Function overloading must be avoided in most cases
//Use:
const Anim* GetAnimByIndex(const int index) const;
const Anim* GetAnimByName(const char* name) const;
//Instead of:
const Anim* GetAnim(const int index) const;
const Anim* GetAnim(const char* name) const;
I found this, and I'm really curious why function overloading must be avoided in most cases.
I want to hear exact answer about it. Thx.
↧