char arraystart[16][4] ={
{'0','0','0','0'},
{'0','0','0','1'},
{'0','0','1','0'},
{'0','0','1','1'},
{'0','1','0','0'},
{'0','1','0','1'},
{'0','1','1','0'},
{'0','1','1','1'},
{'1','0','0','0'},
{'1','0','0','1'},
{'1','0','1','0'},
{'1','0','1','1'},
{'1','1','0','0'},
{'1','1','0','1'},
{'1','1','1','0'},
{'1','1','1','1'},
};
I Need help understanding how to compare 2 rows of this array. I need to pick 2 rows that have three of the same 4 numbers in common such as row 1 and row 2 and make it output{'0','0','0','-'} or like in rows 15 and 16 and make it output{'1','1','1','-'}. Another one would be row 6 and row 14 and make that output{'-','1','0','1'}. I am trying to create a function to do this but i am having trouble. Could someone please help. Also if you have a better way to do this without using 2d arrays let me know.
What I have tried:
Ive tried for loops with i and j but it doesnt seem to be working because i cant et a constant way to check if 3 are right.