You cannot initialize the iss
variable again using the constructor method:
iss(line) ;
You'll need to have another instance of std::istringstream
for the second line, or
alternatively you can use the std::istringstream::str()
function to set the contents (see here for a working sample).