//multidimarrays.cpp //The standard way to declare a 2-dimensional array: // float x[3][5]; //a 3 by 5 array of floats called x // x[2][4]=3.14; //assigning to an element //Problems arise when we try to // create a new 2-dimensional array on the freestore //Awkward for parameters, making higher dimensional arrays. //Can't be used for return type for assignment of one array to another. #include #include using namespace std; const int NUM_MONTHS=12; const int NUM_THEATERS=5; typedef int CustType[NUM_THEATERS][NUM_MONTHS]; //create a type called CustType which is a 2 dimensional array. //type can be used for new, for parameter, for making higher dimensional arrays, //doesn't help with return type or assignment enum Theaters {Shoppingtown, Carousel, Manlius, Westcott, Hollywood}; void ObtainData(CustType c) //parameter is a two dimensional array { int theater; int month; //working down columns this time for (month=0; month