show data from txt file

Hello, i'm a really beginner in c++ code and i have a problem regarding the possibility to read a text file, display the values saved on the file directly on the command prompt line and make simply operation on that data. As example, compute the mean value. The text file is made of a 3 column of data.
how it is possible to make a graph with this value? as example taking the first column as x axis and the second column as y axis.

Thank's a lot for the help

you will need to know the possible value ranges that the columns will have.

do any of the columns contain values that could be plot axes? if they have negative values then no. if they have very large values then also probably no.

if you have two columns that could be used as indices for plot axes then you can populate a 2d array with the third value.

you will probably need to add the values at each location in case more than one row in the file accesses the same plot point.


plot[file.x][file.y] += file.z;
plot[file.z][file.x] += file.y;

Topic archived. No new replies allowed.