findがstdのメンバーではないという奇妙なエラーが発生しました。エラーC2039: 'find': 'std'のメンバーではありません
エラーC2039: 'が見つかりが': '見つける':識別子が
を見つけていない基本的に、私は文字列かどうかを見つけたい 'STD'
エラーC3861のメンバーではありませんベクター内にあります
これはどうして起こりますか?コードアシストはstdにメソッドを見つけることを教えてくれます。
ので、これは私がやったことは基本的である:
#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;
}
}
グーグルを試したことはありますか?また、このコードサンプルは、コードの残りの部分がないため、コンパイルできません。将来はhttp://sscce.orgのコードサンプルを投稿してみてください。正解を与える方がはるかに簡単です。 –