#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 std
和end is not a member of std
。
我该如何解决?