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. hi ,
i am a beginner in java. please tell m

View Tutorial          By: aun at 2011-11-18 06:47:56

2. @Askia-Just change RadioButton1 to RadioButton2 in
View Tutorial          By: Nelson at 2010-03-06 23:12:36

3. superb...thanks :-)
View Tutorial          By: sunny at 2010-11-10 07:20:25

4. thanks a lot ..
View Tutorial          By: indra at 2009-03-25 15:40:03

5. In 6th point .....there is a spelling mistake...mi
View Tutorial          By: Gnani at 2009-09-22 12:25:59

6. I need full code for how to connnect pc to mobile
View Tutorial          By: Vijay at 2009-08-23 23:38:05

7. How could i read a file from my ftp server . sugge
View Tutorial          By: Dinshaw at 2015-02-06 07:22:03

8. be very careful. use of put (or any method inheri
View Tutorial          By: d at 2009-10-14 09:55:23

9. It is simply good and more informative
View Tutorial          By: ARUNA at 2011-06-19 06:32:29

10. can u please help me to read excel sheet in VB
View Tutorial          By: Mohd at 2009-07-05 05:03:11