阅读关于 const_cast
的内容时我遇到了如下句子:
Only the following conversions can be done with const_cast. In particular, only const_cast may be used to cast away (remove) constness or volatility.
1) Two possibly multilevel pointers to the same type may be converted between each other, regardless of cv-qualifiers at each level.
我已经在谷歌上搜索了一下,但没有找到关于多级指针的任何简明、直接的定义。那么:到底什么是多级指针?
(可能的脸掌时刻)它只是一个指向指针的指针,或指向指向指针的指针的指针,例如int **
还是 int ***
?
最佳答案
Is it just a pointer to a pointer, or pointer to a pointer to a pointer, e.g.
int **
orint ***
?
就是这样,是的。
关于c++ - 什么是多级指针?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22308202/