Strings

A string is a series of characters treated as a single unit. A string may include letters, digits and various special characters such as +, -, *, / and $. String literals, or string constants, in C++ are written in double quotation marks as follows:

"John Q. Doe"             (a name)"9999 Main Street"        (a street address)"Maynard, Massachusetts"  (a city and state)"(201) 555-1212"          (a telephone number)

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.