so I have just started learning about inheritance and wanted to know if I can create a factory that checks 3 classes that all extend 1 class and returns one of them into an array
I am still trying to fix my code so excuse some errors but I have 1 class called employees and 3 classes that extend employee called faculty, classifiedstaff, and studentemployee. I am trying to create an employee factory that that takes these 3 classes and returns pointer to the select class depending on the text in the file
here is my code
employee
now my question is can a pointer employee point to all these functions, is there any way I can create a function like this
It seems your question was clipped, I'm not sure exactly what you mean.
If you are wondering about sharing functionality between base and derived classes perhaps you will find this helpful: http://www.cplusplus.com/doc/tutorial/polymorphism/
Please do get back to us with a specific question if you require any further help.