【发布时间】:2017-02-06 13:49:51
【问题描述】:
typedef struct node {
int value;
struct node *next;
} NodeT;
const NodeT *a,b,c;
变量b实际上是一个常量结构元素吗?
【问题讨论】:
-
不,不是。它是
const struct node变量,不是struct元素,也不是常量。const并不意味着它是常量,而是告诉编译器你在初始化后永远不会改变它。