This commit is contained in:
Steffen Matthes 2023-03-25 23:42:14 +01:00
parent cd1951bb6c
commit c4e3ab0672
1 changed files with 42 additions and 0 deletions

42
ex00/main.c Normal file
View File

@ -0,0 +1,42 @@
# include<unistd.h>
# include<stdio.h>
# include<stdlib.h>
int **allo_mem(int **board, int n);
void free_mem(int *borders, int **board, int n);
int handle_input(int argc, char **argv, int *borders, int n);
void put_error();
int main(int argc, char **argv)
{
int n;
int *borders;
int **board;
n = 4;
borders = malloc(n * 4 * 4);
board = allo_mem(board, n);
// handle sum of opposite inputs
if (handle_input(argc, argv, borders, n) == 0)
{
put_error();
return (1);
}
/*
if (backtrack(borders, board, n) == 0)
{
put_error();
return (1);
}
print_stuff
*/
free_mem(borders, board, n);
return (0);
}
// to do get position