// ========================================================================== // $Id: semi_dynamic2d.cpp,v 1.1 2006/09/11 21:38:36 jlang Exp $ // CSI2372 example Code for lecture 3 // ========================================================================== // (C)opyright: // // Jochen Lang // SITE, University of Ottawa // 800 King Edward Ave. // Ottawa, On., K1N 6N5 // Canada. // http://www.site.uottawa.ca // // Creator: jlang (Jochen Lang) // Email: jlang@site.uottawa.ca // ========================================================================== // $Log: semi_dynamic2d.cpp,v $ // Revision 1.1 2006/09/11 21:38:36 jlang // Check-in for lecture 3 // // // ========================================================================== #include #include using std::cout; using std::endl; using std::setw; // All dimensions except first must be determined at compile time const int numCols = 4; /** Print a 2D array with pre-determined number of columns * (numCols must be defined at compile time!) * Array notation is used! * The array is passed by pointer to rows of length numCol */ void printIntArray2D_array( int numbers[][numCols], int numRows ) { for (int r=0;r