Я только что столкнулся со странной ошибкой, которая говорит, что find не является членом std.
ошибка C2039: «find»: не является членом «std»
ошибка C3861: 'найти': идентификатор не найден
По сути, я хочу выяснить, можно ли найти строку в векторе
Есть идеи, почему это происходит? ассистент кода говорит мне, что в std есть метод find.
так что это в основном то, что я сделал:
#include "OperatorUtil.h"
#include <iostream>
#include <string>
#include <stdlib.h>
#include <math.h>
#include <sstream>
using namespace saeConfig;
namespace operatorUtil
{
bool isIn(const Filter filter, const SearchKey key)
{
bool result = false;
string dimensionStr = key.dimensions.getValue(filter.getFilterKey());
if(filter.getFilterValues().size()>0)
{
vector<string> vstr= filter.getFilterValues();
std::vector<string>::iterator it; // Iterator
it = std::find(vstr.begin(), vstr.end(), dimensionStr); //ERROR LINE
// Check do we have the object in the queue
if(it == vstr.end())
{
result =true;
}
}
return result;
}
}