Thread
:
Reverse array in C++
View Single Post
xpi0t0s
Mentor
22Feb2009,20:07
> Maybe not the best way
On the contrary, reversing a string by only looping over the first half, rounded down, is very efficient.
Just to make sure though, try a even number length string, e.g. ABCDEFGH, make sure you get the correct output.