3 ms·
Dirty Coding Tricks
- michaelcampbell 17y agoNot necessarily in the spirit of the article, but one of my favorite nasty tricks (in theory; I never actually did it) was: vi stdio.h #define if(x) while(x)
- DrJokepu 17y agoI this particular one would be quite easy to find due to else clauses.
- michaelcampbell 17y agoExcellent point. How about the reverse? #define while(x) if(x) ?
- DrJokepu 17y agoCould work... As long as you don't have do/while constructs in your code. It's not as common as a while() but people still use it sometimes.