Questions tagged [increment-operator]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
2answers
119 views

CS50 Mario, Signs 'n' Logic

I'm havin' a little tough time with Mario's pyramid. Well the essence of this question is I don't get some of the "triggers" and signs on the code. I mean, I don't understand some signs, e.g. the i++, ...
3
votes
3answers
224 views

what is wrong with using `*ptr = *ptr++;` in a loop?

why can't I ever use the ++ incrementer in a loop? It only ever works for me in the loop conditions. I changed the code to *ptr = *ptr + 1; and it works fine. This has happened in a few different ...
4
votes
2answers
160 views

What is the difference between ++i and i++?

After watching Precedence in the Week 1 Shorts, I know what i++ means, but I still don't understand: What is the difference is between i++ and ++i?
1
vote
2answers
175 views

Trouble incrementing the number in jpeg filenames

I've gotten recover to work... sort of. The problem is difficult to describe without posting my code, but here's an attempt: My program can find all the jpg signatures (in GDB, my jpeg-finding line ...