/* * array2D.cpp (sklar/05-apr-2009) * * this program demonstrates the use of 2-dimensional arrays * */ #include #include #include using namespace std; /* * declare global variables */ const int LENGTH = 3; const int WIDTH = 4; /* * declare and define the printArray() function to display the * elements of the array that is passed as an argument to the function */ void printArray( int myArray[][WIDTH], int length, int width ) { for ( int y=0; y