如何修复“开始不是性病成员”错误消息

时间:2019-06-13 16:02:29

标签: c++ codeblocks

#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
int main ()
{
    int a[] = { 1,2,2,2,3,5,6,6,7,8,8 };
    int b[] = { 1,3,5,7 };

    std::vector<int> cv;
    std::set_difference(std::begin(a), std::end(a),
                        std::begin(b), std::end(b),
                        std::back_inserter(cv));
    for (auto& s : cv)
        std::cout << s << "\n";
}

当我尝试对此进行编译时,出现错误,提示begin is not a member of stdend is not a member of std

我该如何解决?

0 个答案:

没有答案