Delete elements from dynamic array

I've seen topics on this before, but never seemed to get a definite answer. I have a 2D space represented by a 1D dynamic array. I need to be able to delete columns from that array. What's the easiest way to do this?

From googling it, it seems like the simplest way is to just copy the elements you're keeping to a new array, but that honestly seems like a pretty roundabout way of doing something so conceptually simple. Are there any better ways than this?
Last edited on
Are there any better ways than this?

If you are only "deleting columns" and not adding them, you could just shift elements down and pretend the array is smaller.
As in shift every column ahead of the one I'm deleting back by one index? That's... actually not a bad idea!
Topic archived. No new replies allowed.