C++ How to print a string backwards?
<p>I'm trying to print an <code>std::string</code> backwards with iterators like this: </p>

<pre><code>std::string back = "hello";
for(std::string::iterator it=back.end(); it!=back.begin(); --it)
{
    std::cout &lt;&lt; (*it);
}
</code></pre>

<p>But the output will only print out:</p>

<pre><code>olle
</code></pre>

<p>Why is it not also printing out the h? I tried a couple of different things and played around with it, but I just can't seem to figure out why. Any help would be greatly appreciated, thanks!! :) </p>