Pointer arithmetic for void pointer in C

前端 未结 8 1103
执念已碎
执念已碎 2020-11-22 01:23

When a pointer to a particular type (say int, char, float, ..) is incremented, its value is increased by the size of that data type. I

8条回答
  •  灰色年华
    2020-11-22 01:57

    You have to cast it to another type of pointer before doing pointer arithmetic.

提交回复
热议问题