Learn C++ in step-by-step lessons.
Strings
Until now, you have worked with string constants such as cout<<"hello
World\n";. If you want to input, manipulate and output string, the string class provides a number of built-in functions that make string processing easier.
Goals:
- Be able to use some of the string functions to manipulate string data
Objectives:
- Understand when to use getline
- Use the substr function
- Validate string data
Please study the material at each of the links below.
Hello World with strings: video- Hello World with strings
Hello with getline- The substr method with drill
- String: length() method with drill
- Input name as Last,First, break into first and last
- Validating String as Social Security number
Glossary for strings lesson
Full Glossary