use*_*590 -3 c++ pointers type-conversion char
Is there a easy way to convert a const char* to a const char** in C++ (without the use of Boost)? I've tried to use &myConstCharP but that didn't work.
我在这里看不到问题.以下代码对我来说很好:
int main(int argc, char **argv)
{
char c = 'a';
const char *myConstCharP = &c;
const char **p = &myConstCharP;
printf("Your original char is: %c",**p);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
769 次 |
| 最近记录: |