For more details click here . To read a string with included spaces you must use the function getline. This notation indicates that these functions are not defined because they are intended only as place holders, and no object will ever be of type Employee, only a descendent of Employee. Such functions are purely virtual functions and make the class Employee an abstract class . Once yu have created a purely virtual function in a class, the compiler will no longer allow you to create an object in this class.
Abstract classes serve only as a unifying force for a collection of related classes.
Changes in the Code As promised last week , we can use counted pointers in conjunction with virtual functions to simplify the code used to read our file. We might be able to make improvements to the version of run that creates the file, but these would be minor. We are now ready to create a program from a problem description. The grocery list problem will be used for the next few weeks, so is described in the file you can get by clicking here .