hi, I am having trouble with file input to the array I made in the
program.
1. I want to measure how much data are there in the file, and
2. put all the datas into array. (number of array is same as the number
of columns of data)
the file looks somewhat like this.
0.00000000E+0 -5.00000000E+1 3.33823774E-15
1.00000000E+0 -4.99000015E+1 3.45138779E-15
2.00000000E+0 -4.97999992E+1 3.56837278E-15
3.00000000E+0 -4.97000008E+1 3.68932315E-15
4.00000000E+0 -4.95999985E+1 3.81437317E-15
5.00000000E+0 -4.95000000E+1 3.94366216E-15
6.00000000E+0 -4.94000015E+1 4.07733285E-15
7.00000000E+0 -4.92999992E+1 4.21553432E-15
8.00000000E+0 -4.92000008E+1 4.35842074E-15
9.00000000E+0 -4.90999985E+1 4.50614963E-15
1.00000000E+1 -4.90000000E+1 4.65888619E-15
1.10000000E+1 -4.89000015E+1 4.81679981E-15
1.20000000E+1 -4.87999992E+1 4.98006542E-15
1.30000000E+1 -4.87000008E+1 5.14886553E-15
1.40000000E+1 -4.85999985E+1 5.32338693E-15
1.50000000E+1 -4.85000000E+1 5.50382358E-15
1.60000000E+1 -4.84000015E+1 5.69037623E-15
1.70000000E+1 -4.82999992E+1 5.88325241E-15
1.80000000E+1 -4.82000008E+1 6.08266599E-15
1.90000000E+1 -4.80999985E+1 6.28883847E-15
2.00000000E+1 -4.80000000E+1 6.50199939E-15
2.10000000E+1 -4.79000015E+1 6.72238551E-15
2.20000000E+1 -4.77999992E+1 6.95024160E-15
2.30000000E+1 -4.77000008E+1 7.18582095E-15
2.40000000E+1 -4.75999985E+1 7.42938443E-15
2.50000000E+1 -4.75000000E+1 7.68120478E-15
2.60000000E+1 -4.74000015E+1 7.94155984E-15
it goes on much more..............
the first column represents time, second voltage, and third current.
so I want to make voltage[n], current[n] where n represents the
number of data for voltage, current.....
Actually what makes it difficult is that I must change the data format
into double,
because they are all written in the format x.xxxxxE+-x
but maybe I can get through with that problem only if I know WHAT
FUNCTION TO USE.
Please at least could somebody tell me the functions in the fstream
class that
I need to use??
I am stuck with my program for several days, because of this part.
Searching in the web or books didn't help much;;