Question: C++ reading input from argv. For the function computeGradeAndPrint(string filename), how would I read the input of the file into a vector? The file will

C++ reading input from argv.

For the function computeGradeAndPrint(string filename), how would I read the input of the file into a vector?

The file will contain lines of text.

Please see the main function to see that filename contains argv[1] (a text file)

#include #include #include #include

using namespace std;

void computeGradeAndPrint(string filename) {

}

int main(int argc, char ** argv) { if (argc < 2) return -1;

string filename(argv[1]); computeGradeAndPrint(filename);

return 0; }

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!