If I use auto_ptr to store a pointer to a dynamically allocated array when auto_ptr is killed, it will use the usual delete operation , not delete [] , thus deleting the selected array.
How can I (correctly) use auto_ptr for dynamically allocated arrays?
If this is not possible, is there another smart pointer alternative for dynamically allocated arrays?
Thanks in advance.
source
share