c++ - 错误 : insertor is not a member of std

标签 c++ stl set-difference

我有如下代码:

#include<set>
#include<iterator>

some_func()
{
     std::set_difference(s1.begin(), s1.end(), s2.begin(),s2.end(),std::insertor(myresult,myresult.begin()));
}

它给我一个错误:

Error: insertor is not a member of std.

最佳答案

该函数名为 std::inserter ,而不是 std::insertor

关于c++ - 错误 : insertor is not a member of std,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8635117/

相关文章:

c++ - openCV中的imshow函数

C++: Scott Meyers "Effective STL": item 31: know your sorting options: 帮助理解

c# - 在不遇到集合修改异常的情况下从列表中删除项目的最有效方法?

c++ - 优化数组的 c++ 算术计算的常用策略是什么?

c++ - 我可以在算术表达式中调用构造函数吗?

c++ - 限制程序对 unc 服务器的访问

c++ - 如何按值对 STL 映射进行排序?

c++ - 我不能使用 TCHAR[] 找到映射容器 TCHAR* 的键值吗?

haskell - 在haskell中的列表上是否有不同的Ord运算符?

javascript - 范围的差异