Question: Please help me solve this code, and please use functions players.txt: Christian Pulisic Chelsea F.C., Premier League. 82.0 3 79 Cristiano Ronaldo Manchester United. F.C.,

Please help me solve this code, and please use functions

Please help me solve this code, and please use functions players.txt: Christian

Pulisic Chelsea F.C., Premier League. 82.0 3 79 Cristiano Ronaldo Manchester United.

players.txt:

Christian Pulisic Chelsea F.C., Premier League. 82.0 3 79 Cristiano Ronaldo Manchester United. F.C., Premier. 91.0 7 504 Mo (Mohamed) Salah Liverpool F.C., Premier League. 90.0 11 320 Lionel Messi Paris Saint-Germain, French League. 93.0 30 511

Write a C++ program (must use struct and dynamic memory allocation) that reads COUNT player records from a text file (fifadatabase.txt ). The information is used for FIFA 22 Xbox Video Game. Each record has 5 fields (pieces of information) as shown below: Player Full Name (string) Player Current Team (string) Player Rating (double) Player Jersey Number (integer) Goal Scored (int) The program is expected to print the records in the format shown below, sorted in decreasing order based on the number of goals scored by the player: Player Name : Christian Pulisic Current Team : Chelsea F.C., Premier League Current Rating : 82.0 Player Jersey : 3 Goal Scored : 79 The records are stored in the following format (5 lines for each account): The First Line is the player's full name The Second Line is current team with the league. The Third line is the player rating The Fourth line is the jersey number The Fifth line is the number of scored goals Output: Name : Lionel Messi Team : Paris Saint-Germain, French League. Rating : 93.0 Number : 30 Goals : 511 Name : Cristiano Ronaldo Team : Manchester United. F.C., Premier. Rating : 91.0 Number: 7 Goals : 504 Name : Mo (Mohamed) Salah Team : Liverpool F.C., Premier League. Rating : 90.0 Number: 11 Goals : 320 Name : Christian Pulisic Team : Chelsea F.C., Premier League. Rating : 82.0 Number: 3 Goals : 79

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!