S
Steven Lien
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...
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...