#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
void biggies(vector<string> &words,ostream &os=cout,char c=' '){
for_each(words.begin(),words.end(),[&os,c](const string &s){os<<s<<c;});
}
int main(){
vector<string> v={"a","b","c"};
biggies(v);
}
输出
a b c