Is there any way to use different types of iterators in different vectors? Or, is there a function that returns the position of element in vector as an integer?
std::vector<DWORD>::iterator it; // Iterator
// monsterQueue is a <DWORD> vector
it = std::find(bot.monsterQueue.begin(), bot.monsterQueue.end(), object);
// Check do we have the object in the queue
if(it != bot.monsterQueue.end()) // If we do have it
{
bot.monsterDists.at(it) = mobDist; // monsterDists is <int> vector
bot.monsterCoordX.at(it) = PosX; // monsterCoordX is <int> vector
bot.monsterCoordY.at(it) = PosY; // monsterCoordY is <int> vector too
}
That's some sample code, does anyone have any pointers?