7 Strings: Analyzing the Text
Most computer programs, at some point in their life, have to communicate with a human being. Especially as you begin to write programs to be used by other people, it’s important to give the user a clue to what’s going.
For the console-based applications in this book, you have to use words and text in English or some other natural language (as opposed to a computer language—though sometimes I suspect that for some programmers, computer language may actually come more naturally). Working with language involves the use of text strings.
Using strings to print simple messages is easy enough. Strings get more interesting when you pick apart, combine, or analyze them. That’s what this chapter is all about.
The last two ...
Get C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart 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.