Quote Originally Posted by iikitty View Post
Code:
        for (int count=2, ss=s;ss>1;count++)
Get into the habbit of writing PREincrements (++count) rather than post increments (count++).

The only time you want a post-increment is when you want the exact behaviour the post increment gives you. If you don't know/understand the difference (yet), then use pre-increments.

the same is true for decrements, use --count, unless you specifically want the behaviour of count--.

No I'm not going to explain. Just get into the habbit of doing this. It'll make your life a lot easier learning to do this NOW, rather than weening you off the post-inc/decrement later on.