Once again we are into a completely new topic with terminology which will be new to you. If you are new to object oriented programming, you should follow along in this chapter very carefully because every attempt has been made to define every detail of this new and somewhat intimidating topic. One term which must be defined is polymorphism, a rather large word that simply means similar when used in the context of object oriented programming.
Objects are polymorphic if they have some similarities but are still somewhat different.
We will see how it is used in the context of object oriented programming as we proceed through this chapter. We have already studied operator overloading and function overloading in this tutorial, and they are a subtle form of polymorphism since in both cases, a single entity is used to refer to two or more things. The use of virtual functions can be a great aid in programming some kinds of projects as you will see in these two chapters. The last program in this chapter will illustrate the proper use of virtual functions. The first program is very simple and you will recognize it as being somewhat similar to the programs studied in the last chapter except that this program is greatly simplified in order to effectively instruct you in the use of a virtual function.