title: Class stringstream. Cant understand how lineStream works, its parameters;
body: <p>I have the following code, and I know how it works and what it does, however, not at all. I don't understand how these three lines work 
                          <strong>std::stringstream lineStream(line);
              std::string cell;
              std::getline(lineStream, cell, ';')</strong>
  Especially lineStream one;
   I found them in google, but no sufficient explanation. Could you explain me please their behavior or share a good link please? Thanks in advance, have a nice day :)</p>
  
  <pre><code>    container *begin = new container;
      begin-&gt;beginBox = new box;
      container *last = NULL;
  
      std::ifstream  data(filename);
      std::string line;
      std::getline(data, line);
  
      for (container *i = begin; !data.eof() &amp;&amp; std::getline(data, line);)
      {
          std::stringstream lineStream(line);
          std::string cell;
          std::getline(lineStream, cell, ';');
          i-&gt;ID = atoi(cell.c_str());
          for (box *j = i-&gt;beginBox; std::getline(lineStream, cell, ';'); j-&gt;next = new box, j = j-&gt;next)
          {
              j-&gt;apples = atoi(cell.c_str());
              i-&gt;lastBox = j;
          }
  
          i-&gt;lastBox-&gt;next = NULL;
          i-&gt;nextCont = new container(), last = i, i = i-&gt;nextCont, i-&gt;beginBox = new box;
      }
      setAutoIncrement(begin-&gt;ID + 1);
      last-&gt;nextCont = NULL;
      return begin;
  </code></pre>