I read this file with getline(file, line) to save, with the use of stringstream, number in a vector of int and the rest of line in a string. The problem is created by the spaces between the words!
Can anyone help me?
Note that fin1 is a file, line is a string, fil is a template class, "is" is a stringstream and answList is a list. I have implemented the operator ">>" in the Answer class in this way :
1 2 3 4 5 6 7 8 9 10 11 12
friend istream& operator >>( istream& is, Answer <T> &a)
{
is >> a._id;
is.ignore();
is >> a._text;
is.ignore();
return is;
}