"xhzeng" <xhuazeng@sina. com.cn> wrote in message
news:c2d2305d.0 311060314.e3f15 5d@posting.goog le.com...[color=blue]
> I don't decide it, and I need help.
>
> Q:
> const int* pInt = new int(0);
> delete pInt;[/color]
No, it is not. It is not a question. Even
const int* const i = new int(0);
delete i;
is not a question because destructors are allowed to run for const objects
too.
xhzeng wrote:[color=blue]
> I don't decide it, and I need help.
>
> Q:
> const int* pInt = new int(0);
> delete pInt;[/color]
You ran this trough an Internet translator, something like Altavista
Babelfish, I suspect? Unfortunately, none of us can really make out what the
question you have is. Perhaps you would be better of finding help on a forum
where they speak your language.
--
Unforgiven
"You can't rightfully be a scientist if you mind people thinking
you're a fool."
Calum wrote:[color=blue]
>
> xhzeng wrote:[color=green]
> > I don't decide it, and I need help.
> >
> > Q:
> > const int* pInt = new int(0);
> > delete pInt;[/color]
>
> Drop the "const". You can't delete a const pointer.[/color]
Comment