结构指针数组

来源:百度知道 编辑:UC知道 时间:2024/06/08 14:33:14
typedef struct DeliverTable
{
int order;
int reward;
struct DeliverTable *next;
} Deliver;

Deliver *table[100];

table中初始值是NUll吗?

如果不是, 怎么赋成NULL?

table是一个数组拥有100个元素,每个元素都是指针 指向struct结构体
而这个结构体定义的是为了做成链表的形式,你这样定义比较奇怪,一般定义为
Deliver *table就可以了
如果想赋值为0
memset(table,0, sizeof(Deliver))
对于二维数组弄个循环就可以了