A T * can be implicitly converted to a const T *
《C++程序设计语言》里的,《C++标准》应该也找的到。
编译会出错,const放在这有很大的烟雾作用。
知道看到了这么一句话:
const int **ppc;
ppc : a pointer to a pointer to a constant integer.
这下就了解了:
在上段代码里p转换成char **类型,T为char *,所以可隐式转换的类型为char *const*
让人又爱又恨的指针