结构体数组 and 结构体数组大小的内存

1 typedef struct Vex
2 {
3     int Vexs;
4     struct Vex *next;
5 }Vex;
6 
7 Vex vexList[20];

Vex * vexList = (Vex * )malloc(sizeof(Vex)* 20);

有什么不同?

Vex vexList[20]; // 这种方式不能根据输入情况分配,数组个数应该是静态的变量
原文地址:https://www.cnblogs.com/taxus/p/3393690.html