Sunday, June 6, 2010

Strings

Given:
    std::string theirs["theirs"];
The behavior of the following is undefined:
    theirs[theirs.length()] == '\0';
Reference: The C++ Standard Library: A Tutorial and Reference, Nicolai M. Josuttis. Addison-Wesley, 1999, p. 487.

No comments:

Post a Comment