Re: new/delete
- From: "Thomas J. Gritzan" <Phygon_ANTISPAM@xxxxxx>
- Date: Fri, 30 Jun 2006 17:08:06 +0200
c language schrieb:
Hi,
I am using pointer in my program. I write them like:
*DIST=new int [M+1];
and when I want to make the memory free, I write:
delete DIST;
For every new a delete, for every new[] a delete[].
before the "return 0".
I don't know if the way that I am doing is correct or not because I
have some segmentation fault (core dumped) error.
This is a C group, not a C++ group. You are offtopic here.
Thomas
.
- References:
- new/delete
- From: c language
- new/delete
- Prev by Date: Re: void vs void* (philosophical question)
- Next by Date: Re: new/delete
- Previous by thread: new/delete
- Next by thread: Re: new/delete
- Index(es):
Relevant Pages
|