Wrox Programmer Forums
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 14th, 2007, 04:01 PM
Registered User
Join Date: Jul 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default C++ questions

I have a few C++ questions

is this an efficient way to reverse a string

string rstring(string word)
string rword;

rword.insert(rword.begin(),word.rbegin(), word.rend());

return rword;

is there a faster way to reverse a string?

If I am searching in a dictionary file multiple times and deleting entries in between . Is it faster to have an input stream
(but how do I update the stream and delete a line in dictionary) a list or a vector?

Reply With Quote
  #2 (permalink)  
Old August 19th, 2007, 10:39 PM
Authorized User
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to Peter_APIIT

You can have a try with reverse.

Thanks for your help.

Linux is the best OS in the world.
Reply With Quote

Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Interview Questions, C# Interview Questions, dotnetuncle .NET Framework 2.0 4 June 22nd, 2019 07:03 AM
two questions reverand Excel VBA 2 December 5th, 2005 06:33 AM
C# questions zhenliu C# 1 April 15th, 2004 09:18 AM
questions anshul Javascript How-To 1 April 12th, 2004 07:29 AM
many questions Frank1111 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 December 22nd, 2003 09:59 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.