Thursday, June 10, 2010

String

There are three string member functions to get the contents of a string into a C-style array: data(),c_str(),and copy(). c_str() is the only function that appends a '\0' to the end of the contents of the string.

Reference: The C++ Standard Library: A Tutorial and Reference by Nicolai M. Josuttis, Addison-Wesely, 1999, p. 484.

No comments:

Post a Comment