【发布时间】:2020-03-20 17:02:48
【问题描述】:
我有一个非常简单的问题:
const char *y = "string_test";
x = &y;
x 是什么类型?
提前感谢您的回答!
【问题讨论】:
-
y是什么类型?
-
我认为这是一个错字。你的意思是写'q'而不是'y'?
我有一个非常简单的问题:
const char *y = "string_test";
x = &y;
x 是什么类型?
提前感谢您的回答!
【问题讨论】:
假设您的问题中有错字,代码是:
const char *y = "string_test";
x = &y;
x 应定义为:
const char** x; // x is a pointer(Address of) a pointer to a constant char/string
【讨论】: