new/delete
- From: "c language" <jafarikia@xxxxxxxxx>
- Date: 30 Jun 2006 07:47:47 -0700
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;
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.
Any suggestions?
Thanks,
Mohsen
.
- Follow-Ups:
- Re: new/delete
- From: Richard Heathfield
- Re: new/delete
- From: John Bode
- Re: new/delete
- From: Giannis Papadopoulos
- Re: new/delete
- From: Thomas J. Gritzan
- Re: new/delete
- Prev by Date: Printing string constants
- Next by Date: Re: OT: Windows console programs (was Re: Function Pointers)
- Previous by thread: Printing string constants
- Next by thread: Re: new/delete
- Index(es):