This seems like such an easy task, but everything I've tried hasn't worked so far.
I have a file foo.txt
:
3
3 4 2
Now I want to read this file, read the first line and instantiate an int array with the size of the number it read on the first line. Then it should populate that array with the elements in the second line, which has the exact same amount of elements and noted in line one.