The above line should prevent correct compilation of your code.
is empty after execution of the
loop then something went wrong either in the
control expression or in (all) the stringstream extraction operator calls (why so many calls?). You may either debug or log what happens.