[Solved] C++ : Unable to read from large txt file [closed]

Your problem is in the merge function: you exceed the local variable c. long c[30]; maybe there are more problems, that is the first I notice. EDIT Try this: find the differences… #include <map> #include <vector> #include <fstream> #include <iostream> #include <time.h> using namespace std; void merge(vector<long> &,long ,long , long ); void divide(vector<long> &arr,long … Read more