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/mfrbuaa/p/4587817.html