分配空间malloc
代码
typedef struct node{
int a;
struct node* next;
}linklistnode,linklist*;
...........
linklist s;
s=(linklist)malloc(sizeof(linklistnode));
以上形式可以看为,
s=(指针)malloc(sizeof(数据类型));
c链表里的malloc
最新推荐文章于 2024-08-09 13:35:44 发布