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.
C2668
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2668
 
     'function' : ambiguous call to overloaded function
 
     The specified overloaded function call could not be resolved.
 
     An explicit cast of one or more of the actual parameters can
     resolve the ambiguity.
 
     The following is an example of this error:
 
          struct A {};
          struct B : A {};
          struct X {};
          struct D : B, X {};
 
          void func( X, X );
          void func( A, B );
 
          D d;
          void main()
          {
               func( d, d );        // error, D has an A, B, and X
               func( (X)d, (X)d );  // OK, uses func( X, X )
          }
                                    -♦-