View Single Post
  #25   Spotlight this post!  
Unread 29-04-2010, 09:01
Schnabel's Avatar
Schnabel Schnabel is offline
Seriously I'm almost never serious!
AKA: Eric Schnabel
FRC #0469
Team Role: Mentor
 
Join Date: Apr 2006
Rookie Year: 2003
Location: Troy, MI
Posts: 1,176
Schnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond reputeSchnabel has a reputation beyond repute
Re: List of Killer Bee Bot Bottoms

Quote:
Originally Posted by apalrd View Post
I disagree. == is not =.
= sets one variable to another. == checks for a comparison. so I am checking that team is equal to 33, if it is, then win. The order does not matter.
Actually, in C (or C++), it is better to put the constant before the variable, in case you forget the second =, so the compiler will give you an error for setting a constant instead of getting some crazy error at runtime.

EDIT: I see that BJC forgot the second =. The actual one says "if (33==team) win();"
JAVA developer here. That's actually the point I was trying to make, you need the == to compare. I've never played with C or C++, so I have no clue yet.
__________________
I win! XD
Reply With Quote