Skip to main content

Questions tagged [increment-operator]

Filter by
Sorted by
Tagged with
0 votes
2 answers
191 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++, ...
Paul_1898's user avatar
3 votes
3 answers
373 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 ...
Gibb Johnson's user avatar
4 votes
2 answers
197 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?
alciregi's user avatar
  • 157
1 vote
2 answers
185 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 ...
ChromaticRat's user avatar