This commit is contained in:
Bohdan Kapliuk 2024-03-13 18:44:05 +02:00
commit 115d308b5f
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@ list_t *new_list(size_t length, list_element_t elements[]){
list_t* list = (list_t*)malloc(sizeof(list_t) + length * sizeof(list_element_t));
list->length = length;
memcpy(list->elements,elements, length*sizeof(list_element_t));
<<<<<<< HEAD
free(list);
return list;
}

View File

@ -1,6 +1,7 @@
#ifndef LIST_OPS_H
#define LIST_OPS_H
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>