BZ reversing a string cpp