-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_create_arr.c
More file actions
29 lines (26 loc) · 1.11 KB
/
Copy pathft_create_arr.c
File metadata and controls
29 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_create_arr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tebatsai <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/05/15 20:24:54 by tebatsai #+# #+# */
/* Updated: 2019/05/15 20:57:48 by tebatsai ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char **ft_create_arr(int x, int y)
{
char **sq;
int i;
i = 0;
sq = (char **)malloc(sizeof(char *) * (x + 1));
while (i < x)
{
sq[i] = (char *)malloc(sizeof(char) * (y + 1));
i++;
}
sq[i] = NULL;
return (sq);
}