#include <darr.h>
Public Attributes | |
void ** | _arr |
size_t | _size |
size_t | _capacity |
Struct that will hold the actual dinamic array and other informations to search, insert and remove elements from within. Since C doesn't support generic types, the array will be stored as an array that points to a sequence of pointers (I know complicated).
Since all the items is a generic pointer (void*
) to something, it's due to the developer to cast that item into a type that makes sence, for an example: darr_at(mydarr, 1)
will be a void*
, cast this void
to a int
with (int *)darr_at(mydarr, 1)
to interprete this as a pointer to an integer, and now access the value that it's pointing to with an extra *
, like *(int *)darr_at(mydarr, 1)
.
Check the detailed darr_t
description for more information about it's attributes.
void** darr_t::_arr |
size_t darr_t::_capacity |
size_t darr_t::_size |