I have two multidementional I wish to, byref (as all arrays in c++ are passed), pass as a parameter to a function. When I attempt to do this, the compiler throws a bunch of errors. How do you do this properly?
Code:
#include <iostream>
using namespace std;
void displayArraysContents(char*[][], char*[][], const int size)
int main ()
{
char* testArray1[9][9];
char* testArray2[9][9];
for (int i = 0; i < 9; i++)
{
for (int i2 = 0; i2 < 9; i2++)
{
testArray1[i][i2] = "XX";
testArray2[i][i2] = "YY";
}
}
return 0;
}
void displayArraysContents(char* array1[][], char* array2[][], const int size)
{
// Code to cout array contents (I have this and it works).
}