8. Strings: Analyzing the Text
Most computer programs, at some point in their lives, have to communicate with a human being. The standard way to do this is to use text strings. The word string conjures up an image of a series of characters, closely strung together.
However, there seems to be a paradox: Computer processors only understand numbers. How, then, can they communicate with humans? The answer is: through a special kind of code that associates each letter with a number. That’s the basis for understanding text strings, so this chapter starts by examining that subject.
For years now, C++ compilers have supported a sophisticated string class that makes working with text strings easier. For example, the following line of code concatenates ...
Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.