// ========================================================================== // $Id: multid_init.cpp,v 1.2 2014/09/13 19:48:03 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: multid_init.cpp,v $ // Revision 1.2 2014/09/13 19:48:03 jlang // Added C++11 features to lecture 3 // // 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; const int numRows = 3, 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