 <pre><code>std::list&lt;std::string&gt; myList; inputList(myList); std::vector&lt;std::vector&lt;std::string&gt;&gt;myVector(1); for (const auto&amp; str : myList) { if (str == "endOfRow") myVector.push_back({}); else myVector.back().emplace_back(str); } if (myList.empty()) myVector.clear(); // there is no need to update these values inside the loop int vectorRow = (int)myVector.size(); int vectorCol = (int)myVector.back().size(); </code></pre> <blockquote> <p>1) Am I able to iterate through the list, and grab the string that the iterator is currently at? If so, how am I able to add that string into the vector?</p> </blockquote> <p>Yes. The way you are doing it is correct, though you can use better syntax. To add it to the vector, just emplace_back() or push_back().</p> <blockquote> <p>3) When initializing the 2d vector, would pushback work to be able to increase the size as you insert each element?</p> </blockquote> <p>It will. But as you said, if you know the size of the list in the beginning, you can easily initialize it to make it more optimized. If you don't want to initialize the vector, but still want to reserve the space, you can also use vector.reserve()</p>