mercredi 19 avril 2017

Load an array of base class member with an array of members from derived classes

parent class is employee, derived classes are hourly contracted and salaried. I need each of the derived classes to have an array of 10 members.

contracted* contract = new contracted[10];
hourly* hourlies = new hourly[10];
salaried* salary = new salaried[10];
employee** employee1 = new employee*[10];
employee** employee2 = new employee*[10];
employee** employee3 = new employee*[10];
*employee3[10] = &contract[10];
*employee2[10] = &salary[10];
*employee1[10] = &contracted[10];






Comments
0 Comments

0 commentaires:

Enregistrer un commentaire