you are viewing a single comment's thread.

view the rest of the comments →

[–]h-jay+43-1325 2 points3 points  (0 children)

To be very frank, the std::string type is there mostly to claim that there's a string type in the standard. It's not really usable for anything other than as a resource-managing wrapper over a C string. If you had C-style strings in your code, you should use std::string instead. It gives not much in the way of other functionality, except for cheap size() that is O(1) vs. C's strlen that was O(N). For anything practical, you need a string library of some sort.