Learn C++ in step-by-step lessons.

Searching generally means finding one particular item in a list. If you are looking for everyone who worked overtime, or all items that need to be reordered, this is referred to as an exception report, not a search.
An exception report is straight forward: loop through every item: if it matches the criteria, print it out.
Please study the material at each of the links below.
We use a spreadsheet to demonstrate searching.- Sequential search
- The sequential search code
- A Binary Search
- A number guessing game
Glossary for search lesson
Full Glossary