title: Splitting a line of a csv file into a std::vector?
body: <p>I have a function that will read a CSV file line by line. For each line, it will split the line into a vector. The code to do this is</p>
  
  <pre><code>    std::stringstream ss(sText);
      std::string item;
  
      while(std::getline(ss, item, ','))
      {
          m_vecFields.push_back(item);
      }
  </code></pre>
  
  <p>This works fine except for if it reads a line where the last value is blank. For example,</p>
  
  <pre><code>text1,tex2,
  </code></pre>
  
  <p>I would want this to return a vector of size 3 where the third value is just empty. However, instead it just returns a vector of size 2. How can I correct this?</p>