C++ Merge Sort Algorithm
This code doesn't work, as can be shown by including &lt;algorithm&gt; and changing the output:

std::cout &lt;&lt; std::is_sorted(tobesorted.begin(), tobesorted.end()) &lt;&lt; std::endl;




Other things that are surprising:


We pass pointers but always assume they are not null.  That suggests we should be using references instead.
Misspelt std::srand and std::time - though I'd recommend using &lt;random&gt; instead.
std::endl used where there's no need to flush output - just write \n instead.
Why are we using int rather than std::size_t for our left and right indices?
Use of floating-point multiplication for integer arithmetic.
Unused variable j.




There's a risk of overflow here:


int mid = (left+ right)/2;



Better would be

auto mid = left + (right - left) / 2;




This code can be re-written:


std::vector&lt;int&gt; leftvec;
std::vector&lt;int&gt; rightvec;

for(int i= left; i &lt;= mid; i++){
    leftvec.push_back(pvec[0][i]);
}
for(int i= mid+1; i &lt;= right; i++){
    rightvec.push_back(pvec[0][i]);
}



Those vectors will likely re-allocate several times as they are filled, because we didn't reserve() capacity.  Instead of those loops, we could use the appropriate constructor:

std::vector&lt;int&gt; leftvec(pvec-&gt;begin()+left, pvec-&gt;begin()+mid);
std::vector&lt;int&gt; rightvec(pvec-&gt;begin()+mid, pvec-&gt;&gt;begin()+right+1);


It would be easier if we passed iterators rather than indices here.