Increase c pointers

I use c-pointers in which, if I increment like * p ++, it increments p, but returns only the value that p indicates before it was incremented. how can i increase the value indicated by p.

+3
source share
2 answers

do the following: (* p) ++

Using parentheses, you indicated that you want to increase the value specified in.

+6
source

postfix ++ , *, *p++ *(p++). *p, : (*p)++ *p p . ++(*p) *p .

, ++*p, , ++(*p) (*p)++, ++*p *p++.

+4

Source: https://habr.com/ru/post/1759750/


All Articles