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.
C2608
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2608
 
     illegal reference cast - operand not an l-value
 
     The reference could not be cast.
 
     This error occurs when a temporary copy of the referenced value
     cannot be generated.
 
     The following is an example of this error:
 
          struct C
          {
             int mem;
             operator int();
          };
 
          struct D
          {
             operator C();
             void memfunc();
          };
 
          D aD[10];
 
          void D::memfunc()
          {
             C aC = ( C& )( aD + 1 );   // error
          }
                                    -♦-