I am programming a game where I have a class called Wizard
and another class called Judge
.
In main
, I Wizard wizard[7][7];
. And now I am suppose to hand the 7*7 Wizard array to a static method in Judge
static void Initialize(short teamMax, short wizardMax, Wizard*** wizard) {/*stuff...*/};
Well, the stuff (which the compiler did not find any error in) goes like:
for (int i = 1, n = 1; i <= teamMax; i++)
{
for (int j = 1; j <= wizardMax; j++)
{
Judge::Livings[n] = wizard[i][j];
n++;
}
}
Now this part worked out fine, but when I was calling this function in main
Wizard wizard[7][7];
Judge::Initialize(teamMax, wizardMax, &wizard);
It says "incompatible to the parameter of type".
I did some research but I just can't figure out what went wrong... so please help and thanks alot.