c++ - Omitted for loop values -


This is my first post and my first time with C ++. I'm looking at some code from the internet but I have a question about it.

There is a loop in it like: ; & Gt; T; T--;)

I understand what this is doing, but I can not understand what is the situation.

According to this format, for (init; condition; increments) , t - is a condition, but it does not make much sense is. I think that T - is increment, but why is this the second parameter?

Nothing like this should happen: for (cin>> T;; -);

- operator is a "deficit and return" operator . Since it is used as a post decurrent, it returns t and then decreases the value.

Everything that is different from 0 in C ++ is true and viceversa is basically

  t == 0   

is equal to, surely the case of - t will be different, because before that the value will be reduced and then it will be returned (it first loop a walk) Will end).

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -