realloc structure with function in C

后端 未结 3 801
栀梦
栀梦 2021-01-27 07:22

My C program is crashing and I am too new to figure it out. It\'s very simple so far and I imagine the code is enough to figure out what is going wrong.

I am simply try

3条回答
  •  庸人自扰
    2021-01-27 07:59

    Combining Ingo's and codroipo's answers, you have to either return the new pointer from double_array_size, or you have to pass in a pointer to d so you can update the pointer from double_array_size

提交回复
热议问题