Reverse a string

figured it out! thank you :)
Last edited on
you can use a string constructor to do the job:
 
string reverse(str.end(), str.begin());


now reversed hold the reveresed string - (you simply need the iterator to start at the end of your string and stop at the beginning).
Last edited on
Topic archived. No new replies allowed.