subject

LAB 2.3: File 1/0 - CSV update This program should:
• get names of input and output files from command line (NOT from user input)
• read in integers from a csv (comma-separated values) file into a vector
• compute the integer average of all of the values • convert each value in the vector to the difference between the original value and the average
• write the new values into a csv file
in c++#include #include #include using namespace std;int main(int argc, char *argv[]) {string inputFile;string outputFile;// Assign to inputFile value of 2nd command line argument// Assign to outputFile value of 3rd command line argument// Create input stream and open input csv file.// Verify file opened correctly.
// Output error message and return 1 if file stream did not open correctly.// Read in integers from input file to vector.// Close input stream.// Get integer average of all values read in.// Convert each value within vector to be the difference between the original value and the average.// Create output stream and open/create output csv file.// Verify file opened or was created correctly.// Output error message and return 1 if file stream did not open correctly.// Write converted values into ouptut csv file, each integer separated by a comma.// Close output stream. return 0;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 22.06.2019 10:30
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
You know the right answer?
LAB 2.3: File 1/0 - CSV update This program should:
• get names of input and output files fr...
Questions