共享标头。
我可以做这个:
const bool kActivatePlayground=false;
包含在多个文件中时工作正常。
我不能做到这一点:
const char * kActivePlayground = "kiddiePool";
导致错误:重复符号。
但这有效:
static const char * kActivePlayground = "kiddiePool";
为什么static需要 theconst char *而不是 the const bool?另外,我认为static没有必要,因为const总是static隐含的?