主题
:
delete const pointer
查看单个帖子
#
1
(
permalink
)
2008-07-08
hzzhouqq
初级会员
注册日期: 2008-06-11
帖子: 9
delete const pointer
大家好.
下面的程序delete是否执行了呢?
int *p = new int(20) ;
const int* q = p ;
delete q ;
编译是没有错误的.
为什么允许delete pointer to const?
望高手答复...
hzzhouqq
查看公开信息
发送悄悄话给 hzzhouqq
查找 hzzhouqq 发表的所有帖子