错误:insertor不是std的成员
Error: insertor is not a member of std
代码如下:
#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
。
使用std::inserter
,不是std::insertor
。
相关文章:
- std::ofstream 作为类成员删除复制构造函数?
- 使用 std::index_sequence 初始化具有固定大小数组成员的 POD 结构容器
- std::to_string - 'to_string' 不是 'std' 的成员 - Visual Studio Code 1.42.0
- 使用 std::async 时死锁,将来作为成员
- 访问 std:vector 的类成员 std:vector 在一个类中与另一个 std:vector
- 将此类的智能指针追加到成员 std::vector
- 在Visual Studio中删除成员std::vector::d ata()
- C++初始化/填充静态成员 std::数组元素到特定值
- 是否可以在同一对象中对成员 std::shared_ptr 进行成员引用<variable>?
- 成员std::future防止boost::shared_ptr超出范围
- 在GCC中使用Brace Initializer初始化成员STD ::数组时错误
- 错误:非静态引用成员"std::ostream&Student::out",无法使用默认赋值运算符
- 获取指向成员std::string::size的指针无法与libc++链接,但可以与libstdc++一起使用
- 如何创建静态常量成员 std::string 数组
- 如何在构造函数初始值设定项列表中初始化“std::unique_ptr”对象的类成员“std::vector”
- C++ 编译失败,并显示错误:命名空间中没有名为 'snprintf' 的成员'std'
- 重载类下标运算符以访问成员std::vector对象的元素
- 构造类成员 std::vector<std::unique_ptr > 的智能方法<AClass>
- 使用成员std::vector移动语义
- 初始化类成员std::函数时编译错误