C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
C2451
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2451
 
     conditional expression of type 'type' is illegal
 
     The conditional expression evaluated to an illegal type.
 
     The second and third operands (b and c) of the ternary operator
     (a ? b : c) must both be of the same type or must be able to be
     converted to a common type by standard conversions.
 
     A conditional expression can be used as an l-value only if the
     second and third operands are of the same type and both are
     l-values.
                                    -♦-