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.
C2268
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     Compiler error C2268
 
     'operation' : different const or volatile qualifiers
 
     The given operation was performed on a variable that was defined
     as being const or volatile. As a result, the const or volatile
     item could be modified without being detected by the compiler.
 
     This error often occurs when a pointer to an item declared as
     const or volatile is assigned to a pointer that was not declared
     as pointing to either of these type modifiers.
 
     The following is an example of this error:
 
          const  char *p = "abcde";
          int    str( char *s );
          str( p );                // error
                                    -♦-