
please wait
char
s you can use a comparison like:if(matrix[i+1][j] == matrix[i][j])
that will work as expected.char
not just 1) strcmp()
takes as argument a const char *
so use matrix[i]+j
or &matrix[i][j]
.if(strcmp(&matrix[i+1][j] , &matrix[i][j]) == 0 )
strncmp()
works as strcmp
but takes a 3rd argument if you want to declare the actual number of chars to be tested.