for (int k = 0; k != 6; ++i)

LMask[k] = true;

for (int k = 0; k != 6; ++i)

if (LMask[k]

&& (!LMask[0] || (Absa[k] >= Absa[0]))

&& (!LMask[1] || (Absa[k] >= Absa[1]))

&& (!LMask[2] || (Absa[k] >= Absa[2]))

&& (!LMask[3] || (Absa[k] >= Absa[3]))

&& (!LMask[4] || (Absa[k] >= Absa[4]))

&& (!LMask[5] || (Absa[k] >= Absa[5])))

ipiv = k;

LMask[k] = false;

This assumes that ABSA is another array and that you have it defined in your C++; that that out of context I could have otherthings that are not quite right but the basics should be there.