Deleting struct from array of structs.

Say I have:
1
2
3
4
5
6
7
struct employee {
string name;
string department;
float quarterSales[4] ;
};

employee scumbagEmployees[20]


I have the code to import all the data and add new employees. I am not sure what the process is for deleting employees. My initial though was to move the employee I want to delete to the very last position and then decrement the array. I imagine that would work, but it seems a little crude.

What is the "norm" for doing this in c++? thanks
What is the "norm" for doing this in c++?

Don't use arrays; use a vector.
We have specific instructions to use arrays and array of structs :( I have a feeling we will be modifying this code in the future to include classes and vectors.
Well, that's the norm in C++. To not use an array for something that begs for a vector.
Topic archived. No new replies allowed.