>第 23 章 指针>指针与const限定符

zibrer 775131970@qq.com http://learn.akae.cn/media/ch23s04.html
2003-02-26 03:40:15

int const * const a == const int * const a

i do suggest that you can change the expression you use above for that you use cont int * and  int * const


码匠 code_smith@sohu.com
2009-09-29 19:23:42

I have an ambiguous concept about a pointer pointing to a constant value.

We know the following code may cause compiler to complain.
const char c = 'a';
char *pc = &c;

If the theory is the same, why complier should ignore the fllowing type conflict?
int main(void)
{
	char *p = "abcd";
...
	*p = 'A';
...
}


laciqs 530107999@qq.com
2010-08-11 15:05:20

Mr.Song said we can understand "abcd" as const char *, but it's char*.


Louis alzl333@sina.com
2010-11-13 17:31:22

应该区分“编译时”和“运行时”的概念。


如果您有建设性意见,哪怕只是纠正一个错别字,也请不吝赐教,您留下的姓名和email将会出现在本书前言的致谢中。再次感谢您的宝贵意见!