O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Third Edition by Brian Overland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required