Use a C99 compiler that supports the VLA that you are attempting to use. Or look into realloc as previously suggested more than once. Or take the advice to use a fixed size array that ought to be big enough and hopefully then only use what the user requests, as previously suggested more than once.Originally Posted by devilsknight