`std::vector` 'substring concatenator' The point of this is to concatenate a vector of std::strings into one string starting at an index of the vector.

std::string vectorSubstr(std::vector&lt;std::string&gt; vec, int startPos, char seperator)
{
    std::stringstream ss;

    for (int i = startPos; i &lt; vec.size(); i++)
    {
        if (i == startPos)
        {
            ss &lt;&lt; vec[i];
        }
        else
        {
            ss &lt;&lt; seperator &lt;&lt; vec[i];
        }
    }

    return ss.str();
}


Is there anything wrong with this approach? Should  I be using a stringstream or just concatenating strings?
If you are just trying to concatenate vector&lt;string&gt; elements, why not use the following approach:

std::string seperator = " ";
std::string vectorElementHolder;

for (const auto&amp; word : vec){

    vectorElementHolder += word + seperator;

}


Simple and effective, assuming you use C++11.
If you want to change the index where you start, you could always declare an iterator as such vector&lt;string&gt;::iterator to point to the index and go from there.