// Example of using a 2-Dimentional array in C++ // #include // define the number of students and homeworks // These are declared as const - they can't be changed! const int NumStudents = 2; const int NumHW = 3; // this function has parameters: // g - a 2-d array of ints // stu - the student number (first subscript) double student_average( double g[][NumHW], int stu) { double sum = 0.0; for (int i=0;i> grades[i][j]; } } // Using student_average print averages for (int i=0;i