1. 프로토타입
void ft_lstclear(t_list **lst, void (*del)(void *))
2. 용도
3. 리턴값
4. 코드 구현
#include "libft.h"
void ft_lstclear(t_list **lst, void (*del)(void *))
{
t_list *now;
now = *lst;
while (now != NULL)
{
*lst = now->next;
del(now->content);
free(now);
now = *lst;
}
}
5. 코드 설명