Question: C++ please follow the annotation to write code, it would more clear for me. thank you so much!!! #include #include #include using namespace std; int

 C++ please follow the annotation to write code, it would more

C++ please

follow the annotation to write code, it would more clear for me. thank you so much!!!

#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; }

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

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!