Quote Originally Posted by Malcolm McLean View Post
However you can achieve what you want with malloc() and realloc(). use malloc() to create a dynamic array of the initial size, then when you want to resize it, call realloc().
You might also want to try and make the variable you use with `malloc` and `realloc` initialized to `NULL`. Then you can just use `realloc` in a loop without the initial call to `malloc`.