November 2001
Beginner
1128 pages
29h 12m
English
Many programming applications need to process strings. C provides some support with its string.h (cstring in C++) family of string functions, and many early C++ implementations provided home-grown classes to handle strings. Chapter 12, “Classes and Dynamic Memory Allocation,” introduced a modest String class to illustrate some aspects of class design. ANSI/ISO C++ itself provides a more powerful version called the string class. It is supported by the string header file.(Note that the string.h and cstring header files support the C library string functions for C-style strings, not the string class.) The key to using a class is knowing its public interface, and the string class has an extensive set of methods, including several ...