Hi, I would like to use push_back in order to fill up a vector, containing double pointers. However, when I delete the pointers after pushing them back into the vector, the vector gets emptied as well:
If you delete the array the pointer that you just inserted will get invalid. It does no longer points to a valid array object.
Instead of storing pointers I think you should store actual objects. If you want something similar to a regular array you can use std::array, but you could also create your own struct or class to hold the values of each vertex.