Try the following:
for(vector<string>::const_iterator i = features.begin(); i != features.end(); ++i) { // process i cout << *i << " "; // this will print all the contents of *features* }
If you use C ++ 11, this is also legal:
for(auto i : features) { // process i cout << i << " "; // this will print all the contents of *features* }
Rontogiannis aristofanis
source share