C++ STL Algorithm库的简易使用指南
注:代码中使用部分表示方式为伪代码,应根据实际调整
容器运算
std::copy
将一个容器的某段复制到另一个容器后面
// Copy a container to the end of another container.
std::copy(a.begin(), a.end(), std::back_inserter(b)); // range
std::copy_n(a.begin(), n, b.begin());
std::fill
把一个容器中的指定区域填充为某个值
std:
原创
2021-07-13 20:48:57 ·
177 阅读 ·
0 评论