E
Eric Lilja
Hello, I have a std::vector storing pointers to objects that are dynamically
allocated. When I am done with the vector I want to delete all pointers. Can
I use std::for_each() or something to do that in one line? I am so tired of
seeing the following in my code:
for(vector<some_type>::size_type i = 0; i < myvec.size(); ++i)
do_something_with_each_element;
/ Eric
allocated. When I am done with the vector I want to delete all pointers. Can
I use std::for_each() or something to do that in one line? I am so tired of
seeing the following in my code:
for(vector<some_type>::size_type i = 0; i < myvec.size(); ++i)
do_something_with_each_element;
/ Eric