As said, you could use a vector, but if a list is an appropriate container, why try to force it into an array?