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. i want to know how to connect one page to another
View Tutorial          By: mahesh at 2009-08-26 01:31:40

2. Nice example for FileReader and FileWriter,

View Tutorial          By: Tim at 2009-10-21 17:31:00

3. Hello friends ,
I have downloaded all 5 fil

View Tutorial          By: pinnacle at 2013-06-08 13:08:55

4. good but not v.good. it seems the author is big fa
View Tutorial          By: Muhammad Ishaq Awan at 2014-10-29 07:00:44

5. Hello Friends, i am getting an error in following
View Tutorial          By: Albin at 2008-07-10 23:49:33

6. this is the output i get.
Help me.
<

View Tutorial          By: shubham saxena at 2014-04-01 17:06:00

7. package practice_bo;

import practic

View Tutorial          By: nishi at 2011-12-09 02:00:20

8. Hi sir,
i have a critical problem when i dn

View Tutorial          By: Thiru at 2015-09-30 07:02:43

9. Excelente!!
Justo lo que necesitaba.

View Tutorial          By: Cesar at 2010-01-07 17:40:52

10. Hello, this is working fine with jpg file. But I w
View Tutorial          By: Ray at 2015-09-01 04:18:00