Inheritance & virtual functions Vs Generic Programming
I need to Understand that whether really Inheritance & virtual functions not necessary in C++ and one can achieve everything using Generic programming . This came from Alexander Stepanov and Lecture I was watching is Alexander Stepanov: STL and Its Design Principles I always like to think of templates and inheritance as two orthogonal concepts, in the very literal sense: To me, inheritance goes "vertically", starting with a base class at the top and going "down" to more and more derived classes. Every (publically) derived class is a base class in terms of its interface: A poodle is a dog is an