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.
C2666
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2666
 
     'identifier' : 'number' overloads have similar conversions
 
     The specified overloaded function or operator was ambiguous.
 
     This error is caused by formal parameter lists that are too
     similar to resolve ambiguity.
 
     An explicit cast of one or more of the actual parameters can
     resolve the ambiguity.
 
     The following is an example of this error:
 
          void func( int, float ) {};
          void func( float, int ) {};
 
          func( 1, 1 );        // error, same conversion for each func
          func( 1, (float)1 )  // OK
                                    -♦-