Question: c++ i dont know why its not passing the cases cases, if you can please expain why and how it would work Now, let us


Now, let us say each column of data (sample given below) has been stored in a separate file (file 1.txt, file2.txt, file3.txt, ... filen.txt). We need to read all the data files, find the total of each row of data and output the values to output.txt. Let us assume that all the specified data files have same \# of lines \& it does not exceed 1000. Assume that there will be maximum 10 data files. Here is some sample data, actual data can be anything: Program should accept a list of filenames in one line, read the data from all those files and total each row of data. \{ vector filenames; string filename; cout""Enter a list of filenames line by line: "; getline(cin, filename); while (filename !=") \{ filenames.push_back (filename); getline(cin, filename); 3 int num_files = filenames.. size () ; ifstream finput; int value, sum; ofstream foutput ("output.txt") ; for (int i=0;i value; finput.close(); sumt= value; (3) foutput
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
