我刚刚遇到一个奇怪的错误,它说find不是std。
的成员错误C2039:'find':不是'std'的成员
错误C3861:'find':找不到标识符
基本上,我想找出是否可以在向量
中找到字符串知道为什么会这样吗?代码帮助告诉我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;
}
}