CII-2.4指针常量和常量指针


#define T Stack_T
typedef struct T *T;

struct T {
	int count;
	struct elem {
		void *x;
		struct elem *link;
	} *head;
}

const T stk   //指针常量, const修饰struct T *。地址不能变。

const struct T *stk //指向常量的指针, const修饰struct T。

数据不能变。



【推广】 免费学中医,健康全家人
原文地址:https://www.cnblogs.com/yjbjingcha/p/8378413.html