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.
C2546
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2546
 
     'operator' : illegal mix of 'void' pointer with non-'void' pointer
 
     The specified operator was called with incompatible pointer types.
 
     This error can be caused by using an arithmetic operator on a void
     pointer. Pointer arithmetic can only be done with pointers to
     objects.
 
     If the operator must be used with a void pointer, then
     the operator can be overloaded. Alternatively, cast the void
     pointer into a type that can be used with the specified
     operator.
                                    -♦-