What is the code to create a vector that stores the


My objective is to create a piece of code in C++ that reads in information from a .dat file. The dat file can have varying amounts of rows but is SET at 4 columns. These columns and rows are seperated by tabs and each new row is a new line. The values listed in the rows and columns are dynamic and must be able to be changed. Here is an example below of what that those values could look like in one instance.

1 14 4 6
25 46 2 80
11 22 4 43
198 66 105 9

Vectors would work best for creating this since this table is dynamic. I need these numbers to be stored in the vector so I can use their elements for later computation which is done with a for loop iterating with incrementors.

What is the code to create a vector that stores the elements from a dat file (without filling spots in unnecessary spots of the vector with tabs or new lines)?

And can I have an example on how to access each row and column so i can use their values at a later date for computation?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: What is the code to create a vector that stores the
Reference No:- TGS02878009

Expected delivery within 24 Hours