I am completly lost... I need to create a program displaying the following:

Create an application with the ability to enter 5 student names. The information should be:
- Student Id
- Name
- And final grade

Print the information to the console in a tabular format with column headings (like a report).

After printing in order it was entered, sort it in ascending order of the Student Id..

Then after sorting the student information, once again print the information to the console in a tabular format with column headings (like a report).

While doing this, remember it is possible to make arrays of structs. You should be able to reuse much of your week 3 program

Submit your source code (cpp and self developed header files (if any) to the assignment news group.


Can anyone help me on how to get started????? I feel so lost.....

Do one step at a time, and it's simple.

>Create an application

#include <iostream>

int main()
{
  // Code here
}

>remember it is possible to make arrays of structs

#include <iostream>

struct Student {
  std::string name;
  int id;
  int grade;
};

int main()
{
  // Create five students
  Student students[5];
}

See how easy it is at one step at a time? Try and continue by yourself, if you get stuck, we're here to help.

Next step... try to allow the user to input the students details.

Thank you so much! You make it sound so simple! :)

So what does it mean to: "declare your array of structures to use a pointer that you allocate at runtime."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.