August 2002
Beginner
1122 pages
22h 1m
English
I believe the existing standard library string class exhibits undesirable and improper behavior when passed a constant value 0 as an initializer. Perhaps the standard library will be corrected to prevent this problem eventually, and in many languages, we would have no choice but to wait for the library correction. However, we are fortunate that in the case of C++, we can fix this problem in the process of defining an extended xstring class, without losing any of the benefits of the existing std::string class. So this is a fine example of using object-oriented design to make use of a lot of existing code (in the standard library) while adding appropriate and necessary features for our own purposes.
Read now
Unlock full access