Question: C++ programming Please add explain in code. Thanks! Read in a.csv data file (filename comes in from command-line arguments) where each line is structured as

C++ programming

Please add explain in code. Thanks!C++ programming Please add explain in code. Thanks! Read in a.csv data

Read in a.csv data file (filename comes in from command-line arguments) where each line is structured as such: "username, gpa, age". Create a list asa vector that holds list structs. As you read in each line from the file, parse each value using stringstream and convert to the appropriate data type. Then call the addUser function to create the struct and store the values username, gpa, and age (string, float, int) into the struct. Add the struct to the vector. Back in the main function, call the printList function to loop through and print out the list formatted as: "username [gpal age: #" e.g., "elle [3.87] age: 12". Specifications: a. Use the following struct declaration: struct 1ist { string username: float gpa: int age: } b. Use the following function signatures: void addUser (vector *gradeList, stringname, float _gpa, int _age) void printList (const vector gradeList) c. Use getline, stringstream, stoi, stof. d. Be sure to close your file when you are done

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!