in reply to reading a file, put into array. Missing first line

In the while statement you read the first line and in the next line you assign the rest of the file to the array. That way you lose the first line. Just remove the while loop alltogether and it should work.