Think about what you are doing here:
line = openInfile (ins) ;
istringstream iss (line) ;
Your
openInfile()
functions returns the string " " (a single space) which is passed to the
istringstream::istringstream - C++ Reference[
^] constructor:
Quote:
(2) initialization constructor
Constructs an istringstream object with a copy of str as content.
So your
iss
stream contains just the single space string. That is extracted later with the
>>
operator leaving an empty stream object.