This pearl catches me out every once in a while.
if(x = y)
{
.....
}
You need to turn compiler warnings on. GCC certainly warns about this with -Wall, and I assume every other compiler can too...
This pearl catches me out every once in a while.
if(x = y)
{
.....
}
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
You also can find a lot of "pubic" (???)?
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
Mispelt Blacksmith with Blackshit yesterday, the keys aren't even near eachother.
I used to get the false thing a lot until I realized it's such a stupid return value (and yes, in my experience return values are the primary source of falsehood) and set up my own return value framework, which looks something like this:
#define WS_E_SNIPPET
Returning false is like walking out on a date smiling like a clown - it gives pretty much to zero feedback. On the other hand, each time I type in "WS" or "WS_" autocomplete alerady knows I probably mean WS_E_NOERROR and I won't need to feel sorry about it having to suggest a five-letter word a baby could spell (and I couldn't) over a 15-letter monstrosity with underscores.
posiiton. Every dang time.