3 ms·
This was an interesting lesson for me. Not only did pretty much every commenter miss this point, but I did too! We were all talking about better ways to use me
by Stratoscope 4y ago
This was an interesting lesson for me. Not only did pretty much every commenter miss this point, but I did too!
We were all talking about better ways to use memcmp(), such as whether to use the "!= 0" or not, or my memeq() wrapper.
Those are all good things to consider if memcmp() is the right solution in the first place.
I only had the "aha" moment after I took a break for a long walk and dinner.
I should do that more often before assuming I have the right answer... :-)
Maybe this is an example of what they call an XY Problem:
https://en.wikipedia.org/wiki/XY_problem https://en.wikipedia.org/wiki/XY_problem