1 Star 0 Fork 0

ronaldoa/test

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
list.c 518 Bytes
一键复制 编辑 原始数据 按行查看 历史
ronaldoa 提交于 2019-10-19 19:49 . fix
#include <stdlib.h>
#include <stdio.h>
#include "list.h"
list_node *pNewList = NULL;
void print(const list_node *pList)
{
printf("list_node=%d ",*(INT32*)(pList->pData));
}
int main()
{
int i = 0;
for (i = 0; i < 10; i++)
{
list_add(&pNewList, &i);
}
list_for_each(pNewList,print);
return 0;
}
INT32 list_add(list_node **pList, void *pData)
{
list_node *pCurrent = *pList;
while(pCurrent = *pList && )
{
pCurrent = ((*pList)->pNext);
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/macroqz/test.git
git@gitee.com:macroqz/test.git
macroqz
test
test
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385