I have two matrices path[max][2] and input_pair2[max][max] where max is 10 and path_count is dynamic and less than max (let's say 6). I want to use elements of path matrix as an index of input_pair2, i am doing this as in the following code. This works fine with c compiler but giving error in the framework i am using the code in. The error indicates problem of assigning values 0 and 1 to the input_pair2 matrix.

Code:
for (int p = 0; p < path_count; p++)
    {
        if (input_pair2[path[p] [0]] [path[p][1]] == 1)
                input_pair2[path[p][0]] [path[p][1]] = 0;
        else
                input_pair2[path[p][0]] [array[p][1]] = 1;
      
    }
Is there any other way, i can do the same in C?