Storing separate classes to an array

Hey guys, first let me start by saying I've worked with C++ some, but am still not great on it.

Basically, I have to create a program to enroll, drop, and print 7 students in a class. The students ID's, names, and grade level are input by the user. I have all of that done, but here is where I am stuck:

In the drop function I have to have all 7 of the students I have entered, which are now each their own class, in an array so that I can drop one out by their ID in this manner:
1
2
3
4
5
6
7
8
Ihe following class, there are 4 students enrolled and 3 spaces available

Student A | Student B | Student C | Student D |                 |                 |                 |

Removing Student B, will cause students C and D to be moved one spot to the left each:


Student A | Student C | Student D |                   |                 |                 |                 |


Obviously this has to be stored somehow in my enroll function, but I am at a loss as how to store each class as it is created to an array. Any help on how to store each of these classes would be appreciated.

Thanks
R3n
Create an array of the students.
studentClassName myStudents[7];

Input the information of each student into the correct array. Then when calling the drop function, make a temp array to hold the students, and fill your old array with the students minus the one that was dropped.
I would probably use a std::list.
Thanks for the input Volatile, got it working perfectly now :)
Topic archived. No new replies allowed.