【发布时间】:2018-09-30 03:58:02
【问题描述】:
所以我有这个结构:
struct foo{
DWORD fooB;
char *fooA;
}
我有一个变量DWORD bar;,那么我如何查找bar 是否与我的结构中的任何fooB 匹配?
编辑:我的代码(当前)
#include <algorithm> // for. std::find
using namesapce std;
struct foo{
DWORD fooB;
char *fooA;
// .... Use this
}
vector <DWORD> foo;
if ( std::find(vector.begin(),
vector.end(), pIdToFind) !=
vector.end() )
// We found the item in the list, so let's just continue
else
// We haven't found it,
【问题讨论】:
-
什么是向量数组?
DWORD是什么? -
这可能是答案,但我不明白如何使用它,抱歉我是 C++ 新手
-
@jordancedrick 我建议从这里开始:stackoverflow.com/questions/388242/…