const char *p = "hello"; // 正確:指向只讀字面量區
// char *p = "hello"; // 警告/錯誤:C++11 起不允許非 const 指向字面量
const char* 接收,編譯器會阻止修改操作。char arr[] = "hello"; 或 char *p = strdup("hello"); // 記得 freestd::string,自動管理內存、支持修改、避免指針陷阱。參考 cppreference string 學習標準庫用法。