Comment on Tutorial - Reverse a String in C++ By Grant Braught



Comment Added by : gavin

Comment Added at : 2013-02-21 12:31:29

Comment on Tutorial : Reverse a String in C++ By Grant Braught
You are using stl; why do it by hand? All you need is a one liner that uses a built in algorithm...

reverse(MyWord.begin(), MyWord.end());

that works as we can treats a string as a array of characters.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. The logo is a cup of coffee. Java is an island in
View Tutorial          By: kamal goduguluri at 2012-05-30 15:34:21

2. I need some help. I am a programmer - but quite n
View Tutorial          By: Ron at 2013-06-21 00:58:27

3. I am very much thankfull to you in providing the c
View Tutorial          By: c vijaychandar at 2010-05-05 10:14:59

4. Its so very helpful
View Tutorial          By: Anurag at 2011-02-08 04:27:03

5. i WROTE A FILE READER LIKE IT WAS IN THE SAMPLE BU
View Tutorial          By: LILI at 2011-11-06 01:47:20

6. also MEGA IMPORTANT:

make sure you

View Tutorial          By: niko at 2013-04-19 18:55:14

7. Finally! You enlighted me in a small problem: it w
View Tutorial          By: Fernando Martin at 2011-02-25 12:54:58

8. org.apache.jasper.JasperException: An exception oc
View Tutorial          By: manikanta at 2015-02-02 05:39:09

9. thank you.
View Tutorial          By: lluulnw at 2014-11-22 12:39:35

10. Very nice article.
Thank you

View Tutorial          By: Ahmed Adel at 2013-02-11 18:33:51