【发布时间】:2012-09-13 07:30:57
【问题描述】:
我对在网络上找到的一段代码有一些疑问,该代码位于http://www.c.happycodings.com/Data_Structures/code9.html。
- 为什么将 strarray 定义为
**? -
我们必须先
malloc()这个数组,然后malloc()每个元素吗?strarray = (struct node **)realloc(strarray, (count + 1) * sizeof(struct node *));strarray[count] = (struct node *)malloc(sizeof(struct node));
如何完全释放()这个数组?
谢谢
【问题讨论】:
标签: c arrays struct malloc realloc