I have this function
Code:
void verifyMatrix(int n, int m, char *orig, char **mat)
{
char verifyString[5];
int k;
k=0;
// Creating a string
for (int i=n; i<(n+DIM); i++)
for (int j=m; j<(m+DIM); j++)
{
verifyString[k] = mat [i] [j];
k++;
}
verifyString[4] = '\0';
if (strcmp(orig, verifyString) = 0)
tmpMat[n][m] = orig[0];
return;
}
the function without the strcmp construnct work; with strcmp I have in compilation this error:
error C2106: '=': left operator must be an I-value
origin is an array declared as
char firstString[5];
tmpMat is a matrix declared as
char **tmpMat; and allocated as dinamic.
How is my error ? I hope in your help.
Thank you and best regards.
Nino