我知道例如"hello"是类型const char*.所以我的问题是:
我们如何分配像"hello"这样的非字符串const char*:
char* s = "hello"; // "hello" is type of const char* and s is char*
// and we know that conversion from const char* to
// char* is invalid
Run Code Online (Sandbox Code Playgroud)是一个文字字符串"hello",它将在我的所有程序中占用内存,或者就像临时变量在语句结束时会被销毁?