#include <cat/gen.h>
char **catgen_vecapp(char **vec, char *string);
void catgen_vecfree(char **vec);
The string will become part of the array, and should not be freed or modified. As the vec argument may become reallocated, it should not be used again. Instead, use the return value from catgen_vecapp.
The vec can be freed using catgen_vecfree, which will deallocate the array and all the strings in it.
catgen_vecapp returns the NULL-terminated, possibly reallocated, array.