I have been “lucky” enough to write code like this a few days ago:
if(memcmp(side[i], side[j], sizeof(side * lines)) == 0) return true;
Now it’s obvious to me why it didn’t work as expected. But can you find the bug? If you got it, what techniques do you use to avoid problems of this kind in your code?
//Note: the bug image is from Slashdot.