Quote:
Originally Posted by DjScribbles
Yes, that is polymorphism. Basically the function that is used is determined by the parameter types you pass into the function.
Inside the class it defines each different input parameter arrangement with the same function name, and you automatically select between those different functions by the parameters you provide.
|
It is a form of polymorphism. Function overloading and templates are what is known as static polymorphism. When speaking with most C++ programmers though, polymorphism generally refers to dynamic polymorphism, implemented using function pointers and virtual functions. Static polymorphism is decided at compile time, and is based upon the visible type of the objects to the compiler. Dynamic polymorphism, however, is actually based upon the run-time type of the object.