TITLE: The type of string literals is not const correct [ Adapted from "C++ Gotchas", tutorial notes by Tom Cargill, p. 37 ] Even though you may not change characters in a string literal, the type of the literal is not const. The type is char[] not const char []. [ I believe this was done for backwards compatibility with the C standard IO library, ie printf, etc. -adc ] #include int main () { char* danger = "literal"; danger [2] = 'b'; // compiles OK printf ("%s\n", danger); return 0; } On one machine the output might be "liberal". On another machin the output might be undefined. Note that some machines trap this as a run-time error by separating data and code into different segments. Note that the following alternative is safer and preferable const char* p = "literal"; For more information, see the ARM p. 10.