How to pass a 2D array to another function in C++?
Here the code
void results()
{
double storeScores;
for (int ii = 0; ii < NUM_ROWS; ii++)
{
cout << "Please enter 9 Numbers that you want to input for group" << ii + 1 << endl;
for (int jj = 0; jj < NUM_COLS; jj++)
{
cout << jj + 1 << " | ";
cin >> storeScores;
scores[ii][jj] = checkInput(storeScores);
}
}
}
double checkInput(double aScores){
if(aScores > 20 || aScores < 0){
cout << "Invalid value! Enter score again:" << endl;
cin >> aScores;
}
return aScores;
}
void printscores()
{
cout << " " <<endl;
cout << " " <<endl;
cout << "Sample Output:" << endl;
cout << "-----------------------------------" << endl;
cout << "pair before tr. after tr." << endl;
cout << "-----------------------------------" << endl;
}
Can ya help me to pass the array from results to printscores. i've been trying to figure this out all day