Also, I assume you meant :
if(strcmp(p[i], p[j]) == 0)
instead of :
>> if(strcmp(p[SIZE][i], p[j][SIZE]) == 0)
The strcmp function takes strings (char*) as parameters. What you were passing were single char's, and depending on the vale of SIZE, they might even have been invalid (ie. not part of any of the strings on the stack).
Main Topics
Browse All Topics





by: askbPosted on 2009-10-29 at 19:06:43ID: 25699763
If you are passing a two-dimensional array to a function:
COLUMNS];
// 2D array
int myarray[NO_OF_ROWS][NO_OF_
// function call
myfunc(myarray);
// function's declaration
void myfunc(int myarray[][NO_OF_COLUMNS])
or
void myfunc(int (*myarray)[NO_OF_COLUMNS])
hope this helps!!