Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
push_swap/stack/ft_stacksize.c
Adam Joly 220751604a asdflkaj
2024-02-12 15:27:29 +01:00

28 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_stacksize.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/05 11:42:40 by adjoly #+# #+# */
/* Updated: 2024/02/05 11:44:21 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../push_swap.h"
size_t ft_stacksize(t_stack *stack)
{
size_t i;
i = 0;
while (stack)
{
stack = stack->next;
i++;
}
return (i);
}