Question: 2D Arrays :: Please use C++ Part 2 - Read floats into 2 dimensional array In this part, you will read a file with floating
2D Arrays :: Please use C++

Part 2 - Read floats into 2 dimensional array In this part, you will read a file with floating point values separated by commas and store them in an array. int fillArray (string filename, float array [1 [5]) The fillArray function takes in two arguments: the filename and a float two dimensional array that can hold 5 floats in each row. Your function should fill the array with the values from the file, and return the total number of lines of the file, excluding the header line The input file will look like this. The first line is a header line that describes the columns of data in the file. This line must be ignored when reading the data Assignmentl, A2, A3, A4, A5 90.2, 80,0, 75.4, 98.2 94, 93.5, 92, 88, 87.5 80.2, 76, 88.2, 90.1, 82 For the above input, you should get an array like this: 90.2 94 80.2 80 93.5 76 75.4 98.2 87.5 82 92 88.2 90.1 HINT: Think about how you could use the Split function you wrote in recitation for parsing lines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
