Name: Axen 2006-06-18 12:35
I'm probablly just getting the syntax wrong. Here's what I got.
// function declaration
void process_mat (int nMat, char matName[][25]);
// multidimensional dynamic array initialization
char **matName;
matName = new char*[nMaterials];
for (int i=0; i < nMaterials; i++)
matName[i] = new char[25];
//function call
process_mat(nMaterials, matName);
When I try to compile, the error I get is "cannot convert type 'char**' to type 'char(*)[25]'"
// function declaration
void process_mat (int nMat, char matName[][25]);
// multidimensional dynamic array initialization
char **matName;
matName = new char*[nMaterials];
for (int i=0; i < nMaterials; i++)
matName[i] = new char[25];
//function call
process_mat(nMaterials, matName);
When I try to compile, the error I get is "cannot convert type 'char**' to type 'char(*)[25]'"