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: I understand what this is doing, but I can not understand what is the situation. According to this format, for Nothing like this should happen: for Everything that is different from 0 in C ++ is is equal to, surely the case of (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?
(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.
true and viceversa is basically
t == 0
- 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
Post a Comment