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_stacknew.c

27 lines
1.1 KiB
C
Raw Normal View History

2024-02-12 15:27:29 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_stacknew.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/05 11:45:19 by adjoly #+# #+# */
/* Updated: 2024/02/05 14:11:46 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "../push_swap.h"
t_stack *ft_stacknew(int nb)
{
t_stack *stack;
stack = malloc(sizeof(t_stack));
if (!stack)
return (NULL);
stack->nb = nb;
stack->next = NULL;
return (stack);
}