This tutorial shows how to read elements into an array when you don't know the total number of elements in advance.