I am quite new to programming, and I have tried restlessly to figure out how to do this, but Alas I have yet to find anything. In my program, I have a struct. It is a sport sim, so the struct looks a bit like this
struct Team{
string name;
int reputation;
}
I have over one-hundred teams declared in an array
Team team[120];
I need something to arrange these teams by their reputation, and I need the program to be able to figure out who the top four teams (based on reputation) are to put them in the playoffs.
I am still new to programming, so any help is appreciated!