-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray.h
More file actions
20 lines (18 loc) · 708 Bytes
/
array.h
File metadata and controls
20 lines (18 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <stdlib.h>
#include "types.h"
struct FixedArray{
void **data;
enum TypeName fixed_type;
size_t size;
size_t capacity;
};
struct FixedArray *create_f_array(size_t capacity, enum TypeName fixed_type);
void append_to_f_array(struct FixedArray *f_array, void *element);
void *remove_f_array(struct FixedArray *f_array, int index);
void *pop_f_array(struct FixedArray *f_array);
int count_f_array(struct FixedArray *f_array, void *element);
struct FixedArray *slice_f_array(struct FixedArray *f_array, int start, int end);
void reverse_f_array(struct FixedArray *f_array);
void sort_f_array(struct FixedArray *f_array);
void print_f_array(struct FixedArray *f_array);