Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use c++, thx a lot. 2. Read in a.csv data file (filename comes in from command-line arguments) where each line is structured as such:

image text in transcribed

please use c++, thx a lot.

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". Specifications: a. Use the following struct declaration: struct list string username float gpa; int age hi b. Use the following function signatures: void addUser(vector gradeList, string name, float gpa, int age) void printList(const vectorclist> gradeList) Use getline, stringstream, stoi, stof. Be sure to close your file when you are done. c. d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: David M. Kroenke

5th Edition

B000CSIH5A, 978-0023668814

More Books

Students also viewed these Databases questions

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago

Question

How is slaked lime powder prepared ?

Answered: 1 week ago

Question

Why does electric current flow through acid?

Answered: 1 week ago

Question

=+ What would it look like? Who should deliver it?

Answered: 1 week ago