Why doesn't the increment operator work on the second example?

Why can’t I use it like in this one: