while(intIndex > 2)
{
  ...
  intIndex--;
  ...
} // GOOD: correct cycle
...
while(intIndex > 2)
{
  ...
  int intIndex;
  intIndex--;
  ...
} // BAD: the variable used in the condition does not change.
