Never seen before C++ for loop

The condition of the for loop is in the middle – between the two semicolons ;.

In C++ it is OK to put almost any expression as a condition: anything that evaluates to zero means false; non-zero means true.

In your case, the condition is u--: when you convert to C#, simply add != 0:

for (u = b.size(), v = b.back(); u-- != 0; v = p[v]) 
    b[u] = v; //                     ^^^^ HERE

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)