Is this reimplemented quicksort correct?
I know you haven't mentioned anything about this, but I think it should still be addressed.

You should not be passing around C arrays in C++.  The entire array is not passed; it merely decays to a pointer to the array.

Instead, use a storage container such as an std::vector.  These will not decay to pointers, and using such containers is more idiomatic C++.  If you have C++, you can use an std::array instead.

Declare and push back the elements:

std::vector&lt;int&gt; values;

values.push_back(6);
values.push_back(6);
// ...


If you have C++11, initialize an std::array instead:

std::array&lt;int, 6&gt; values = { 6, 6, 9, 5, 3, 7 };


Pass either one to a function:

void func(std::vector&lt;int&gt;&amp; values) {}




void func(std::array&lt;int, 6&gt;&amp; values) {}


You will also no longer need n; storage containers know their sizes.  You can access this value with values.size(), which is of the return type std::size_type.  This is also safer because the returned value will be updated as the container changes size.

If you don't have C++11, display the container with (const) iterators:

std::vector&lt;int&gt;::const_iterator iter;
// OR
std::array&lt;int, 6&gt;::const_iterator iter;

for (iter = values.cbegin(); iter != values.cend(); iter++)
{
    std::cout &lt;&lt; *iter;
}


If you do have C++11, use a range-based for-loop:

for (auto&amp; iter : values)
{
    std::cout &lt;&lt; iter;
}


You can use auto here to give you the correct container type automatically.