chore: initial commit
This commit is contained in:
25
array_list.h
Normal file
25
array_list.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Created by Lennart on 02/12/2023.
|
||||
//
|
||||
|
||||
#ifndef ADVENT_OF_CODE_2023_ARRAY_LIST_H
|
||||
|
||||
#ifndef ELEMENT_TYPE
|
||||
#define ELEMENT_TYPE int
|
||||
#endif
|
||||
|
||||
typedef struct array_list_struct {
|
||||
ELEMENT_TYPE *data;
|
||||
int capacity;
|
||||
int length;
|
||||
} array_list;
|
||||
|
||||
array_list* alist_create(int capacity);
|
||||
|
||||
void alist_add(array_list *alist, ELEMENT_TYPE entry);
|
||||
|
||||
void alist_free(array_list *alist);
|
||||
|
||||
#define ADVENT_OF_CODE_2023_ARRAY_LIST_H
|
||||
|
||||
#endif //ADVENT_OF_CODE_2023_ARRAY_LIST_H
|
||||
Reference in New Issue
Block a user