Ok as part of my project described here I was trying to delete a complete row and column of a 3d dynamic array some kind of 2d matrix of strings...
Well I'll try to ask the simple question for 1d arrays so I can extend it to multidimensional arrays... Let's suppose I have a dynamic allocated array and I have n elements and I want to delete an element of it, so that now the array has n - 1 elements... My question is, is there a simple way of doing this? And if there isn't which I think is the answer to that, my second question is:
I think maybe the best way of doing this is, copying one array element by element, to another array which has size n-1, except the element I wanted to 'delete'?
But then I'll end up having two arrays in stead of one... Let's say I don't want to use another array...
Is it then the best way to do this to shift all elements except that one I want to delete and then reallocating the memory to n-1?
Thank you very much! ;D