O'Reilly logo

C++ Without Fear: A Beginner’s Guide That Makes You Feel Smart, Second 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

5. Arrays: All in a Row...

Much of the power of computers stems from their ability to work on arbitrarily large amounts of data—arbitrary in this case meaning “any number of times you like.”

An array is an arbitrarily large collection of data indexed by number. With a few keystrokes you can create array data structures of any size. Then, by using loops, you can process the data structure efficiently, often with just a few lines of code. Loops and arrays go hand in hand. Together, they help make programs not just powerful but useful.

A First Look at C++ Arrays

Suppose you’re writing a program to analyze scores given by five judges in an Olympic kite-flying contest. You need to store all five values for a while so you can measure statistical properties: ...

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