WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

(post is archived)

[–] 5 pts

If they had made it const that wouldn't have happened.

[–] 7 pts

Assignment, equivalency, those are the same riiiiight?

[–] 3 pts

Exactly!

Now this guy gets it!

[–] 2 pts

Or just enabled modern compiler warnings.

"Or just used a real language." -- C++ hater

[–] 1 pt

if(isCrazyMuderingRobot = true)

Not sure what that language is (java?) but the conditional check looks like an affectation to me, which should lead to nothing at all (compilation error)

Besides I'm not sure how that ";" after kill(humans) would work right before an else without brackets...

[–] 1 pt

It looks like C code to me. That part should compile just fine with C or C++, but although the compiler gives you a warning these days it allows you to confuse assignments with comparisons. The expression will read the value from the left side of the assignment in the evaluation. Sometimes it's convenient to do that to get some things done (Python added the walrus operator to let you do it safely), but it's usually a mistake.