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,
Please give the better example of resou

View Tutorial          By: Keerthi at 2012-01-11 11:28:24

2. thank you....
I have a problem.
I my

View Tutorial          By: AbhiRules at 2010-08-05 20:55:27

3. ya its correct but tell me where is main method???
View Tutorial          By: kashiNATH MOKASHI at 2011-08-20 05:33:19

4. hai

Please show ByteAraayOutputStre

View Tutorial          By: WebMayuri at 2010-02-10 22:30:01

5. Can I ask something,

Can you show m

View Tutorial          By: wawa at 2014-05-03 15:28:35

6. Excellent.
Just one question... What is the

View Tutorial          By: HeilGates at 2010-08-04 13:38:12

7. this really helps me alot :)
View Tutorial          By: liezl at 2014-08-08 13:38:58

8. i want my program to allow more than one trainee&r
View Tutorial          By: carl at 2011-01-30 22:21:21

9. thanks! it helped!
View Tutorial          By: shgy at 2015-03-17 07:42:40

10. hi
thanks for the above code
Anyone

View Tutorial          By: mjnanthini at 2010-09-29 00:59:01