not sure what language this is.
if ^ is xor, it is also xor in c++.
c++ has if(condition) else blocks.
c++ is zero indexed, so first array location is 0, not 1 (seems true for yours too)
is this a one-d array or a 2-d array where you only looking at 1 column?
with some assumptions as to what gibberish that code is in, something like
1 2 3 4 5 6 7 8 9 10 11
|
vector<something> _dict;
... //fill in _dict with something
for(index = 1; index < _dict.size(); index ++)
{
if(_dict[index-1] ^ _dict[index] == 1)
code;
else //possible second if statement here if necessary. unclear if necessary.
{ //begin block
othercode;
} //end block
}
|
if dict is 2-d, it may be
vector < vector < something> > _dict; //2-d vector
c++ does not allow the above to be different types; you can't have a string by int 2-d thing. you would need something else to do that, if you need it, ask?
if pass means don't do anything this loop, or is some other weird keyword, we have break and continue, which may be what you want, or you can jumble if-blocks around in the loop to do whatever it is most likely