errors.hlp (Topic list)
Error Message
                                                  Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler warning (level 4) C4206
 
     assignment within conditional expression
 
     The test value in a conditional expression was the result of an
     assignment.
 
     This warning is informational.
 
     An assignment has a value (the value at the left side of the
     assignment) that can be used legally in another expression,
     including a test expression. However, the intention may have been
     to test a relation instead of an assignment.
 
     For example, the following line, which causes this warning,
     assigns b to a and compares the value of a with 0:
 
          if (a = b) ...
 
     However, the following line tests whether a and b are equal:
 
          if (a == b) ...
                                    -♦-