Question: In C + + create a client program ( main ) called lab 1 . cpp . Create a dynamic 1 D array of strings
In Ccreate a client program main called labcppCreate a dynamic D array of strings called "members". Create a dynamic D array of integers called "ratings". The rows of the "ratings" array is associated with the members and the columns will associated with the book ratings which can be values Open and read from the "ratings.txt file only once! and populate the members and ratings with all the member and book ratings information read from file. The user must specify the file path for the data file; however, for testing, you can add these files bookstxt and ratings.txt to your lab project. Download the project files here: pfiles.zip you will only be using "ratings.txt for this lab!Populate the "members" array with the member names and the "ratings" array with that members' ratings.Since the first two lines of the "ratings.txt file include:Brandon Moose The first two rows of the "members" array will contain:BrandonMooseAnd the "ratings" array will contain:The highlighted portions are array indexes. Note: both the "members" array and the D "ratings" array will have rows, or the numbers of members listed in the "ratings.txt file; the "ratings" array will have columns, or the number of ratings listed for each member in the "ratings.txt file.Print the contents of the "members" array and the "ratings" array.Deallocate memory from the two dynamic arrays.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
