REFACTOR: Fixed Arg 1 resize

This commit is contained in:
2026-09-23 21:33:30 -04:00
parent f51a03c476
commit 8a52f22b8a
5 changed files with 207 additions and 90 deletions
+13 -8
View File
@@ -6,10 +6,10 @@
*/
/*
* Types Wanted:
* Char
* Float
* Int
* String
* Char 8 Bits
* Float 32 Bits with suffix of 'f'
* Int 32 bits
* String 32 Bits with suffix of 's'
*/
#include <stddef.h>
@@ -24,12 +24,17 @@ main()
{
char ar1[] = { '1', '2', '3', '4' };
char ar2[] = { 'a', 'b', 'c', 'd' };
Vec8_t v1 = create(ar1, find_len(ar1));
Vec8_t v2 = create(ar2, find_len(ar2));
// Vec8_t v1;
Vec8_t v1 = create(ar2, find_len(ar2));
// print_vec(&v1);
// printf("Hello\n");
// v1 = assign(&v1, &v2, 0, 1);
v1 = insert(&v1, 1, 5, 'a');
v1 = reserve(&v1, 9);
print_vec(&v1);
v1 = insert(&v1, 1, 'x');
v1 = resize(&v1, 12);
// v1 = insert(&v1, 1, 5, 'a');
// printf("%c", at(&v1, 1));
// printf("RESERVED SIZE: %zu", v1.max_size);
print_vec(&v1);
// v2 = resize(&v2, 3);
@@ -54,6 +59,6 @@ main()
// print_vec(&v1);
// printf("SIZE: %zu\n", v1.size);
delete(&v1);
delete(&v2);
// delete(&v2);
return 0;
}