Let say I don't want to use vector and use dynamic array ( Just a learning purpose). From this dynamic array which I have allocated I want to delete specific index.
int * array = new int[10];
delete &array[3];
When I try to do this I get SIGSEGV, Segmentation fault.
How do I delete specific index (lets say index 3 , I know its contiguous memory and it will create hole but just for learning purpose) like I am trying to do above correctly and why am I getting segmentation fault if this is my memory?