why and when is a double-pointer required?

后端 未结 3 1871
野性不改
野性不改 2021-01-16 04:40

I have been a sysadmin most of my life, but recently decided to practice some my dev knowledge and attempt a devops position. I have as such been practicing some C and Pytho

3条回答
  •  醉话见心
    2021-01-16 05:38

    h is actually a copy of the original pointer, so your original pointer doesnot get modified. That is why you should use a double pointer.

    There are numerous questions related to that on SO. for example Using single versus double pointers in Linked lists implemented in C

提交回复
热议问题