Posted on 2001-07-15
i need to read 2 columns of foating points feagures from a text files, something like this:
and so on...
there is at least one space between 2 feagures and the floating point number is unknown which means that it might be one number after floating point and might be 4 numbers after floating point.
i'm using this code right now:
double mass, score;
CArray<double,double> arrMass, arrScore;
in >> mass >> score;
the problem is that i wanna use file exception in order to catch reading exceptions, such as string instead of floating points feagures, or more than 2 floating points feagures in one row.
what is the best way to achieve it?