的动态数组我有一段代码,我在网络上找到的,它位于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));
如何free()此阵完全?
由于
1)'基本类型',你的意思是int,double等等,对吗? – groove
是,炭,短整型,长,布尔,浮点,双精度,长双和wchar_t的 – Minion91