// Don’t return a pointer to something that will soon go away. #include // Return a cheery message: const char *message() { char buf[] = "Hello there, folks!\n"; const char *p = buf; // p = "¡Hola!\n"; return p; } int main() { std::cout << message(); // Why doesn’t this work!? return 0; }