Each column contains distinct information, and I wanna read them and store in
3 distinct arrays in my c++ program. What function or algorithms are required?
Now I am thinking of using "getline(fin, str)" to store each line in a string called str,
then break the string into 3 numbers, but I have no idea how to break string to
numbers that consist of str. (fin is ifstream object.)
(No round off and truncation is allowed. what is a proper data type?)
It would be great if you can give a few lines of sample code.
I appreciate it.
Small note: an STL vector may not be the best container to read in a data file. If the data file is large, the vector will have to resize each time that it reaches it's reserved size. Remember that a vector is stored in contiguous memory, so each internal resize involves copying the entire contents of the container.