Q如果不能修改字符串字面量,为什么不将它们定义为字符的const数组?
A其中一个原因是,有大量的代码包含像下面这样的行:
char *p = "Hello, world!";
另请参见问题 1.32。
由 托管