Making a class list using Bloodshed C++

Guys.. I need a program that is a class list.
Main page has 3 options. Add a new student. Check class list. Exit.
Then in add a new student you have to enter a name and the program will automatically assign a student number such as "110xxxxx"
After entering that the program will ask if you would want to enter another one, go back to main page, or exit.
Then in checking class list it would display all of the names of the students inputted. Then after displaying the student's names, it will prompt exit? or go back to main page. Please help me sir. It has to have arrays and use dynamic. Could anyone help me?
I see the obvious traits of a homework question.

You create a class called student, with name and stuff like that. Also, a static variable to define the next new ID could be in that class. Take one for the new student in the constructor, and +1 the staic var. In this class you can use dynamic construction/destruction, see tutorials on Classes II on this site for that.

The menu could simply be requestion a number, all this in a while(menuDecision != 3). You should declare that variable prior to the loop.
1
2
3
4
5
6
7
8
9
10
11
12
Student students[200]; // Or a virtually unfeasable number, not too high though
char menuDecision = 0;
while(menuDecision != '3')
{
cout << "1: Add student" << endl;
cout << "2: List all students" << endl;
cout << "3: Exit" << endl;
cout << ">";
cin >> menuDecision;

// switch/case or if/else if to understand the input.
}


Then keep a int to increment by one for each student added and list that number of students from the array. And add it to students[n - 1] where n is that variable.

I hope I helped you, while still being within the limits of what I can do without getting my post deleted.

You know, part of being a programmer is to think logical, you should have thought up a sollution or part of it asap as you read your assignement. You might get vaguer assignements from a potential employer I think.
Last edited on
Topic archived. No new replies allowed.