Thread: Climb a tree
View Single Post
  #5  
Old 02-14-2013, 08:48 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Quote:
Originally Posted by Secrets View Post
Yes.

if(var = othervar) in C++ will compile, but will not have the proper comparison.
Luckily almost every compiler out there has warnings to tell you if you've made this mistake. If it isn't a mistake, and there are valid reasons to use this construct, then you can write your code to avoid the warning in those cases.
Reply With Quote