C
c language
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
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