Yor getFile could be simpler.
Code:vector<double> getFile() { vector<double> input_from_file; fstream loaded_file("unsorted_numbers_short.dat"); if (!loaded_file) { cout << "File not found!"; return input_from_file; } double temp; while (loaded_file >> temp) input_from_file.push_back(temp); return input_from_file; }