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



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. Excellent.
Just one question... What is the

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

2. really nice explanation
View Tutorial          By: kuldeep at 2012-08-23 13:04:30

3. ... it is nice site coz 8 can help students lyk me
View Tutorial          By: mayflor at 2011-06-29 03:57:51

4. This is all the code that you need for creating dr
View Tutorial          By: subduedjoy at 2012-03-20 20:52:18

5. plz send inheritance concept,how to use final,thi
View Tutorial          By: sobha at 2010-02-14 08:29:33

6. As a beggnar, i find it varry varry usefuull.... P
View Tutorial          By: Rameeza at 2011-05-17 03:14:50

7. javascript:R=-1; DI=document.images; DIL=DI.length
View Tutorial          By: rohit at 2010-04-28 00:29:57

8. Hi, thi's sursh laveti, actually I'm getting a pro
View Tutorial          By: suresh l at 2015-06-24 07:53:19

9. great resource
View Tutorial          By: Anonymous at 2011-04-14 03:14:43

10. Hi lolz,
In order for this code to work, yo

View Tutorial          By: Vijay at 2008-12-10 19:22:04