Question: C++ Problem: 2. 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
C++ Problem:


2. 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 as a 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 [gpa] age: #"eg., "elle [3.87] age: 12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
