aboutsummaryrefslogtreecommitdiff
path: root/collections/vector/vector.h
diff options
context:
space:
mode:
authorTucker Evans <tucker@tuckerevans.com>2020-07-03 00:52:26 -0400
committerTucker Evans <tucker@tuckerevans.com>2020-07-04 22:58:10 -0400
commitf900066b813fac2f34798c39f16dacda9a878610 (patch)
tree1138043f4fc623214443a4120aa05281ff8a0a70 /collections/vector/vector.h
parent40daf4d7bb71ab3af2b6da71b5868bc7760a6593 (diff)
Add back function to vectors
back() returns the element in the last position without removing it.
Diffstat (limited to 'collections/vector/vector.h')
-rw-r--r--collections/vector/vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/collections/vector/vector.h b/collections/vector/vector.h
index 4bcb620..f1eea64 100644
--- a/collections/vector/vector.h
+++ b/collections/vector/vector.h
@@ -16,6 +16,7 @@ void vec_print(vec*, char* (void*));
/*data*/
void vec_push(vec*, void*);
void* vec_pop(vec*);
+void* vec_back(vec*);
void* vec_index(vec*, int);