Mergesort-->Again making problem

hello,i asked similar question two days back and i received answers too but still mergesort implementation is making problem.I did my previous implementation using arrays and now i did using vectors but still the result is same i.e Runtime error.I hope for answers that can solve my problem.Thanks(link)

In your code , you have declared vector as vector a . This is a vector “a” of size 0. Then you are trying to access to its positions from 0 to 5 in next for loop. This is causing runtime error. If you want to fill the vector , then you must use push_back operation or declare a vector of size 6.

vector<int> a;    
a.push_back(number);

or

vector<int> a(6);   //vector of size 6

See this link.

Done.Still Runtime error

post link of your modified code…

Check this link :slight_smile: