is the definition (not declaration) of employee present and is it all included into the main function. in other words did you leave employee::save empty with no definition.
it is a virtual function and i meant for the whole Employee class to be abstract and use it only to derive other classes from it. In the other classes the Save function is defined.
Im guessing i have to define it in the Employee class, so how would i do that if Employee never has an instances?
For it to be pure virtual, you must declare it like this: virtualvoid Save(ofstream&) = 0;
Note the =0, this makes it pure virtual rather than just another virtual function, meaning the class will then be abstract. Being abstract also means you can't instantiate a generic Employee class, but you can instantiate any non-abstract classes that derive from it, and polymorphism will still work just fine.