和iterator有关:
for_each(first_it,last_it,fun),用来做循环
binary_function,ptr_fun,用来适配全局函数
mem_fun用来适配类的成员函数
bind1st,bind2nd用来绑定参数
ostream_iterator
copy(first_it,last_it,std::ostream_iterator<int> (cout,"\n"));
for_each(first_it,last_it,fun),用来做循环
binary_function,ptr_fun,用来适配全局函数
mem_fun用来适配类的成员函数
bind1st,bind2nd用来绑定参数
ostream_iterator
copy(first_it,last_it,std::ostream_iterator<int> (cout,"\n"));
本文详细介绍了C++标准库中与迭代器相关的几个重要概念,包括for_each函数的应用,用于循环binary_function,以及如何使用ptr_fun来适配全局函数、mem_fun适配类的成员函数。此外还讲解了如何利用bind1st和bind2nd绑定参数,以及如何使用ostream_iterator进行输出。

1739

被折叠的 条评论
为什么被折叠?



