Thread: C++ questions
View Single Post
  #1 (permalink)  
Old July 14th, 2007, 04:01 PM
jam93 jam93 is offline
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