I am trying to write code that takes in virtual voids and pure virtual voids. My understanding is that with a pure virtual void you do not include the function in the base class, but in the subclass. If you don't, you make the subclass abstract. Well, there's the error I am getting for the first problem. I have an override in the subclass, so I can't figure out what the problem is.
The second error I am getting is that there is no instance of constructor that matches the argument list. Please help, I have read several things, rewatched the demos 3 times. I know it has to be something simple...I just can't see it.
Both errors are in the main.cpp file at the bottom of this message.
Thanks for the help.
Here is the code:
const std::string first_name;
const std::string last_name;
const std::string race;
const std::string sex;
Person(const std::string & first_name, const std::string & last_name, const std::string & race, const std::string & sex, int & age, long long & phoneNumber);
Person * p = new Student("Barry", "Slater", "White", "Male", 45, 6785551919, "Physics"); <error here: object of abstract class type student is not allowed: pure virtual function "Person::Outputidentity" has no overrider>
Person * t = new Teacher("Dwayne", "Wylds", "Asain", "Male", 61, 4045552323); <error here: No instance of object "Teacher::Teacher" matches the argument list. argument types are: (const char, const char , const char, const char, int, unsigned long) >