Reading data from file into an array
Hi I have compiled your code, with the .txt it runs well, without gives the strage numbers that you see. So probably you are opening a file that does not exists, or can not be red. This snippet checks if the file exists, raises an error if not, and uses a vector(more suitable in c++)