26 lines
466 B
C
26 lines
466 B
C
//
|
|
// 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
|