Programming in c++ Arrays Dale/eems/Headington
1 Arrays
Programming in C++ Chapter 12 Topics One-Dimensional Arrays s Using const in Function Prototypes s Using an Array of struct or class Obiects Using an enum Index Type for an Array s Special Kinds of Array Processing s& Two-Dimensional Arrays s Passing Two-Dimensional Arrays as Arguments Another Way of Defining Two-Dimensional Arrays Multidimensional Arrays
2 Chapter 12 Topics ❖One-Dimensional Arrays ❖Using const in Function Prototypes ❖Using an Array of struct or class Objects ❖Using an enum Index Type for an Array ❖Special Kinds of Array Processing ❖Two-Dimensional Arrays ❖Passing Two-Dimensional Arrays as Arguments ❖Another Way of Defining Two-Dimensional Arrays ❖Multidimensional Arrays
Programming in C++ C++ Data Types simple structured integral enum floating array struct union class char short int long bool float double long double address pointer reference
3 C++ Data Types structured array struct union class address pointer reference simple integral enum char short int long bool floating float double long double
Programming in C++ Structured Data Type A structured data type is a type that o stores a collection of individual components with one variable name o and allows individual components to be stored and retrieved
4 Structured Data Type A structured data type is a type that ❖stores a collection of individual components with one variable name ❖and allows individual components to be stored and retrieved
Programming in C++ Declare variables to store and total 3 blood pressures int bp1, bp2, bp3 int total 4000 4002 4004 bp1 bp2 bp3 cin >>bp1 > bp2 > bp3 total s bp1+ bp2+ bp3;
5 Declare variables to store and total 3 blood pressures int bp1, bp2, bp3; int total; 4000 4002 4004 bp1 bp2 bp3 cin >> bp1 >> bp2 >> bp3; total = bp1 + bp2 + bp3;