
-----------------------------------
MadiAraly
Thu Jun 09, 2016 9:38 pm

URGENT: Merge Sort for Vectors Not Sorting...
-----------------------------------
Hi there. I'm new to the merge sort, but this is day four and I can't for the life of me figure out why this code won't sort my vector. I use CodeBlocks.
When compiled, it simply outputs the array it it's scattered order. I don't understand why it executes the function, yet apparently does nothing at the same time. ANY help is appreciated, thank you so much! 

#include 
#include 
#include 
#include 
#include //random number gen
using namespace std;

vector  c;

void merge(vector ,int, int , int );
void mergesort(vector  a, int low, int high)
{
    int mid;
    if (low < high)
    {
        mid=(low+high)/2;
        mergesort(a,low,mid);
        mergesort(a,mid+1,high);
        merge(a,low,high,mid);
    }
    return;
}
void merge(vector  a, int low, int high, int mid)
{
    int i, j, k;
    i = low;
    k = low;
    j = mid + 1;
    while (i 