24 Aug
2009
24 Aug
'09
2:20 a.m.
The same way that you would stream any normal vector: vector<string> &files = vm["file"].as< vector<string> >(); vector<string>::const_iterator iter = files.begin(); cout << "Files selected: "; for(;iter!=files.end();++iter) { cout << *iter << ";"; } cout << "\n";
Consequently, if you have Boost trunk installed, then you could do this as well since it does support streaming vectors: #include
using namespace boost::spirit::karma; using namespace boost::spirit::ascii; generate(cout, "Files selected: " << (*char_)%';' << eol, vm["file"].as< vector<string> >());
Or you could simply do:
#include