If you want to mimic the code you saw in the thread you highlighted, note that the code uses a pointer. The function that uses the pointer is basically changing what the pointer is pointing to.
Therefore you should do this to simulate this behavior:
void mergesort(std::vector<int>& inputvector, int beg_i, int end_i)
You must pass the vector by reference. The reason why you did not see the results is that passing by value creates a local temporary copy, and when the function returns, the temporary goes away. You don't want this -- you want the results to be directed to the vector you're passing in, not a temporary copy, so pass the vector by reference.