int *itPins = pins;for(int i = 0; i < count; i++){    ConfigureGpifPinAsGpioOutput(itPins);    itPins++;}I have the impression that doing two things in one line is bad practice. This is why I am advancing the iterator outside of the only statement, using it. However, I feel blindly following a rule.Is this code less error-prone than if the ++ is inside the function invocation?Why?Does this rule apply to such ultra-simple cases or is it meaningful only for more complex program structures?
Is doing two things on one line always a bad practice?
c;loops
It is not always bad practice to do multiple things on one line, but it does have a higher risk of making the program appear more complicated that it needs to be.If I were pedantic, I could argue that in the line for(int i = 0; i < count; i++), you are also doing multiple things, but very few people would mark that line as a violation of the rule.On the other hand, if you had a line like ConfigureGpifPinAsGpioOutput(itPins++);, then the increment in the argument does increase the complexity as I would have to look twice to be sure that the code is correct and I would probably flag it as needlessly complicated.Another way to write the loop is like this:for(int i = 0; i < count; i++){    ConfigureGpifPinAsGpioOutput(pins[i]);}where you rid yourself completely of the issue.