/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_list_at.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: gtertysh +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/09 15:31:04 by gtertysh #+# #+# */ /* Updated: 2016/11/09 16:27:44 by gtertysh ### ########.fr */ /* */ /* ************************************************************************** */ #include "ft_list.h" #include t_list *ft_list_at(t_list *begin_list, unsigned int nbr) { unsigned int i; t_list *temp; i = 0; temp = begin_list; while (i < nbr && begin_list != NULL) { temp = begin_list->next; begin_list = temp; i++; } return (temp); }