Quote:
Originally Posted by Secrets
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.