Announcements and Reminders
|
||
Recording2 Dimensional Arrays
You
can think of it as an array of one-dimensional arrays
Pass
the array to a function
Pass one element to a function Pass one row to a function Pass a column to a function Example 2-2 - 2D Arrays and Functions Example 2-4 - Read data from a file into a 2 dimensional array Input file
Input data stored in a 2D int array
Example 2-5 - Sort a 2-dimensional array by a column 3-Dimensional Arrays"You can think of a 3-dimensional array as an array of two-dimensional arrays, or an array of an array of one-dimensional arrays."
Videos Buckys C++ Programming Tutorials - 35 - Passing Arrays to Functions (8 minutes) This is a good one, if you're running behind Buckys C++ Programming Tutorials - 36 - Multidimensional Arrays (6 minutes) This is a good one. C++ Tutorial 17 - Multidimensional Arrays as Parameters (21 minutes) |
||
Lab Exercise #3Put your name, the compiler and operating system used, and Lab Exercise #3 in a comment at the top of your exercise Complete the program using the following main() and producing the indicated output. The initialize function should assign a random number between 0 and 255 to each element of the array. Note: your random numbers may differ from those shown below. Hint: you'll next the hex manipulator for the second half of the output.
***** OUTPUT *****
|