2d Array as a function help

hey team, i need a little direction on my program. Im trying to use my 2d array in a function, and im having a hard time getting the syntax correct. when i run this, i get an error, but it says "2 external errors" and it dosent point me to any part of my code...any input or direction would be appreciated. Clearly, im a beginner, so if you could try and keep it simple, id appreciate that.

// testscore.cpp.cpp : main project file.
//three arrays: a one-dimensional array to store the students’ names,
//a (parallel) two-dimensional array to store the test scores,
//and a parallel one-dimensional array to store grades.
//Your program must contain at least the following functions:
//a function to read and store data into two arrays,
//a function to calculate the average test score and grade,
//and a function to output the results.
//Have your program also output the class average.

#include "stdafx.h"
#include<iostream>
#include<cctype>
#include<string>
#include<iomanip>
using namespace std;
const int numrows=10;
const int numcol=5;
int matrix [numrows][numcol];
void sumrows(int matrix[][numcol],int numrow);

int main()
{
const int Max=10;
string Name[Max]= {"Johnson","Aniston","Cooper","Gupta","Blair","Clark","Kennedy","Bronson","Sunny","Smith"};
for (int i=0; i < Max; i++)
//cout<<Name[i] <<endl; displays names
const int Rows=10;
const int Col=5;

int studentGrades[numrows][numcol]= {{85, 83, 77, 91, 76},
{80, 90, 95, 93, 48},
{78, 81, 11, 90, 73},
{92, 83, 30, 69, 87},
{23, 45, 96, 38, 59},
{60, 85, 45, 39, 67},
{77, 31, 52, 74, 83},
{93, 94, 89, 77, 97},
{79, 85, 28, 93, 82},
{85, 72, 49, 75, 63}};
sumrows(studentGrades, numrows);
cout<<endl;

return 0;
}

void sumRows(int matrix[][numcol],int numrows)
{
int row, col;
int sum;
for(row=0; row < numrows; row ++)
{
sum=0;
for(col =0; col < numcol; col++)
sum=sum+matrix[row][col];
cout<<"average =" <<(row+1)<<sum<<endl;
}
}
Topic archived. No new replies allowed.