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

Java program to get location meta data from an image

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

Archived Comments

1. Hi,

I am using this code and gettin

View Tutorial          By: Akanksha at 2014-01-20 10:31:31

2. I am getting error in setContentView(R.layout.main
View Tutorial          By: user at 2012-01-13 06:49:42

3. Can some body throw more light on TRANSIENT ....
View Tutorial          By: Anish at 2010-08-03 07:30:58

4. hello sir , i just implement your code and modify
View Tutorial          By: tushar at 2012-01-31 05:21:37

5. Hi mounika, Did you download and install the javac
View Tutorial          By: Ramlak at 2008-04-27 05:49:42

6. Its a good intro about J2ME..Thanks
View Tutorial          By: Deiveegaraja Andaver at 2012-02-10 06:53:29

7. Hi,
Pls help me.I need a full java code wit

View Tutorial          By: karan at 2009-11-26 11:29:56

8. Yes Left shift result is wrong its like
5

View Tutorial          By: Ragunath k at 2010-05-10 04:45:33

9. i nice programs tks
View Tutorial          By: jai at 2011-05-09 14:09:38

10. Hi Daniel,

Please suggest me, inste

View Tutorial          By: Pradeep at 2013-12-05 07:35:32