Hello, I am using auto_ptr for the first time in a large project, but I have a question. How does an auto_ptr knows when to use delete[] or delete? I am using in like this:
In this case, auto_ptr should delete de pointer with delete[].Code:auto_ptr<char> buffer(new char[buff_size]);
What about:
Thanks any insight.Code:auto_ptr<AnObject> buffer(new AnObject);