Pointer arithmetic for void pointer in C

前端 未结 8 1102
执念已碎
执念已碎 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 02:09

    Pointer arithmetic is not allowed on void* pointers.

    0 讨论(0)
  • 2020-11-22 02:09

    cast it to a char pointer an increment your pointer forward x bytes ahead.

    0 讨论(0)
提交回复
热议问题