I have a csv file that is being read as a continous string of different characters and values(integers and Real #'s).
I separated these 35 different values by interating with factor of 35.
My goal now is to convert these different characters and values into int, float, and keep some as strings.
I have began trying to do some below, but I can only do it with integer values and it does not seem to work for float values. I also can't figure how to switch more than two ranges of values while converting them into arrays.
for (unsigned i = 0; i < all_words.size(); i+=35)
{
outfile << all_words[i] << "\t" << all_words[1+i] << "\t" << all_words[2+i] << "\t" << all_words[3+i] << "\t" << all_words[4+i] << "\t" << all_words[5+i] << "\t" << endl;
string word = all_words[1+i];
double RID;
istringstream ss( word );
ss >> RID;
cout << RID << endl;
}
}