Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

C++ String Join

DZone's Guide to

C++ String Join

·
Free Resource
// description of your code here


string str_join(const vector
  
    & vec,const string & sep)
{
        if(vec.size()==0)
                return "";
        string::size_type size=sep.length()*vec.size();
        for(unsigned int i=0;i
   
  
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}