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.
C2674
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2674
 
     'operator' : operands could not be converted from 'type1' to
     'type2'
 
     A conversion was not defined to convert an operand to the
     required type.
 
     Define a constructor or conversion operator to make the required
     conversion.
 
     The following is an example of this error:
 
          class C
          {
             public:
             C();       // no constructor with an int argument
          } c;
 
          class D
          {
             public:
             D( int );
             D();
          } d;
 
          void main()
          {
             c = 10;    // error
             d = 10;    // OK
          }
                                    -♦-