What is the currently way to use string?



 DEVELOP > c-Plus-Plus > What is the currently way to use string?

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1
Topic: DEVELOP > c-Plus-Plus
User: "Steven Lien"
Date: 06 Aug 2003 11:01:29 PM
Object: What is the currently way to use string?
I have a Tree like data structure and each node stores a "string" to
represent a word that the node represent..
and since i do need to print out string from each node, using following
method
string s = node.getWord();
cout << s.c_str();
the assignment (=) will be very inefficient since it copied a new copy to
print....
so my question is
what is the most popular method to deal with string?....to allocate memeory
using "new" or using copying assignment?
Any help will be appreciated...
.

 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER