++t is a post incremental operator, thus it will increment before it is used in something like
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// suppose t = 1
while ( ++t != 10 ) // the comparison will be 2 != 10
{
// it is now t = 2 during first iteration
}
// whereas
t = 1;
while ( t++ != 10 ) // is 1 != 10 ?
{
// t = 2 as well but the comparison was different
}
Check here:
http://www.cplusplus.com/doc/tutorial/operators/
Specially this part:
A characteristic of this operator is that it can be used both as a prefix and as a suffix. That means that it can be written either before the variable identifier (++a) or after it (a++). Although in simple expressions like a++ or ++a both have exactly the same meaning, in other expressions in which the result of the increase or decrease operation is evaluated as a value in an outer expression they may have an important difference in their meaning: In the case that the increase operator is used as a prefix (++a) the value is increased before the result of the expression is evaluated and therefore the increased value is considered in the outer expression; in case that it is used as a suffix (a++) the value stored in a is increased after being evaluated and therefore the value stored before the increase operation is evaluated in the outer expression.