Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- resizeEmployees(int newCapacity){
- if(newCapacity == employeesCapacity){
- employeesCapacity *= 2;
- }
- Employee* employees2 = new Employee[employeesCapacity];
- for (int i = 0; i < employeesCapacity; i++){
- employees2[i] = employees[i];
- }
- delete[] employees;
- employees = employees2;
- }
- resizeEquipment(int newCapacity){
- if(newCapacity == equipmentCapacity){
- equipmentCapacity *= 2;
- }
- Equipment* equipment2 = new Equipment[equipmentCapacity];
- for (int i = 0; i < equipmentCapacity; i++){
- equipment2[i] = equipment[i];
- }
- delete[] equipment;
- equipment = equipment2;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement