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



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. <uses-permission android:name="android.per
View Tutorial          By: Dev at 2012-04-06 06:19:03

2. I think the programmer overlooked that "this
View Tutorial          By: Joe Schmoe at 2010-10-16 00:01:27

3. well done!!nice work
View Tutorial          By: Dxy at 2010-07-26 00:46:55

4. Hi There Busy doing a project and found that i cou
View Tutorial          By: Steven Owen Nell at 2010-09-05 13:32:01

5. what if i use multiple switch statement, is it wor
View Tutorial          By: earl at 2012-01-29 04:10:25

6. Works like a charm for me ! but i stuck with an is
View Tutorial          By: santosh at 2014-12-17 12:44:09

7. all of codes of t-C++ ide, it is applicable to use
View Tutorial          By: jonard at 2009-06-05 20:41:39

8. To the,
sir/mam, i want to do java certific

View Tutorial          By: CERTIFICATION OF JAVA at 2011-03-03 02:27:05

9. Thanks
View Tutorial          By: Cecilia at 2012-08-07 05:05:51

10. i really hate do while loop statement, can u pls h
View Tutorial          By: mARjO at 2011-09-01 03:50:18