It's a c++ exercise, I will copy and paste it below with the code that I came up with. The code seems to be getting stuck in a loop and the texts scrolls across my screen so fast that I have no idea what to do and its hard to stop it. I have no idea where I'm going wrong so if someone could look at it for me please I'd be really greatful.
This is the exercise
(1) set up a league table with the number of teams (say 4 for simplicity) set up the struct league set up a dynamic array of numTeams for the league write a function to enter all the team names and set all the other variables to 0
(2) set up a composite struct called e.g. TeamsPlayedOrNot set up an array of size numTeams you will enter each team and the corresponding information for the teams they will play and whether they have played or not. This team information will be got from the league table teams. You should try to do this automatically. Set playedOrNot to false This information will be used to decide what teams have played against each other. See part 3
(3) Its now time to play a match!!!!!!! Look up a main team and a team they must play against. Ensure that a team hasn’t played a match. You can print out the teams that hav’nt played for the given team and the position in the inner array. You need to set playedOrNot to true.
Collect the information required for the league match and update these details into the league for each corresponding teams. Also enter these details into the TeamsPlayedOrNot array for the second team
(4) It is now time to sort the league table in order from the highest score to the lowest score. You can use a selection sort/bubble sort- some simple sort
and the following link is a PasteBay link to the code that I have prepared.
I hope you can help, thanks.