DEV Community

Discussion on: I Am Not A Real Programmer

Collapse
 
workmad3 profile image
David Workman

'humans' appears to be undefined, and it's either a missing closing } or poor indentation on the else clause.

So I'm surprised this compiled :)

Thread Thread
 
qm3ster profile image
Mihail Malo

it's either a missing closing } or poor indentation on the else clause

Butt where? :o

static bool isCrazyMurderingRobot = false;

void interact_with_humans (void) {
  if (isCrazyMurderingRobot = true)
    kill(humans);
  else
    be_nice_to(humans);
}
Thread Thread
 
workmad3 profile image
David Workman

Oops, my bad... I managed to insert braces around the clauses in my memory.