标签:c++
for_each函数的用法
std::for_each(cpths.begin(), cpths.end(), print);
void print(const std::string& e) { std::cout << e << std::endl; }
std::vector<std::string>::const_iterator iter = cpths.begin(); for (; iter != cpths.end(); ++iter) { cout<<*iter<<endl; }
标签:c++
原文地址:http://blog.csdn.net/xiao_lxl/article/details/45847443