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. it very usefull to introduse the j2me to me

View Tutorial          By: Sudhir at 2011-08-31 13:05:40

2. i want some brief realtime examples
View Tutorial          By: SURYA.C at 2015-08-20 05:06:18

3. this code works very well for me , but it runs onl
View Tutorial          By: m. usman at 2013-08-31 14:17:22

4. thnx, 4 ur explanation, that was usefl
but

View Tutorial          By: some1 at 2009-04-28 03:26:28

5. what is the use of int getch(void)
and unge

View Tutorial          By: sania at 2014-06-04 17:15:30

6. Thanks.I was searching the internet for a lot of t
View Tutorial          By: Habi at 2011-12-22 07:43:51

7. well no one answered , i figured it out yesterday
View Tutorial          By: oded at 2008-09-29 00:32:16

8. This the very good introduction to the J2ME for th
View Tutorial          By: chetan jain at 2010-04-01 06:39:32

9. hey good code woww. this code lot of help me much
View Tutorial          By: vaibhav malpani at 2015-03-25 05:48:50

10. <uses-permission android:name="android.per
View Tutorial          By: Dev at 2012-04-06 06:19:03