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



Comment Added by : gavin

Comment Added at : 2013-02-21 12:30:57

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 there, I fixed the above (non-working) example
View Tutorial          By: JavaBoy at 2011-09-24 05:41:19

2. hi..dud.......
please help me in my proj

View Tutorial          By: amar usakoyal at 2010-05-25 03:31:16

3. Hi Friends.... Can you please send the working ver
View Tutorial          By: shafi at 2010-02-18 08:28:49

4. I used code when command button clik , it wil show
View Tutorial          By: sekh umar at 2011-06-23 01:40:21

5. hi i unable to retrive am getting below excepti
View Tutorial          By: vignesh at 2015-03-25 17:14:58

6. Thanx................!!!!!!!!!!!
View Tutorial          By: ankita at 2012-01-21 19:16:54

7. how to use isset keyword with multidimensional arr
View Tutorial          By: mehul at 2015-01-19 23:47:02

8. @Srini

Hi Srini, I can answer your

View Tutorial          By: Sudev Wilson at 2015-04-08 12:23:33

9. I am a B. Tech. (ECE) student, can i also give scj
View Tutorial          By: Sneha Agarwal at 2013-07-11 08:10:17

10. Fantastic work guys
View Tutorial          By: wizard at 2012-09-22 04:18:59