By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,191 Members | 766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,191 IT Pros & Developers. It's quick & easy.

What is the currently way to use string?

P: n/a
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

string s = node.getWord();
cout << s.c_str();

the assignment (=) will be very inefficient since it copied a new copy to

so my question is

what is the most popular method to deal with string? allocate memeory
using "new" or using copying assignment?
Any help will be appreciated...

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.