#include <vector> #include <memory> using namespace std; typedef vector<auto_ptr<int> > int_array; void Test() { int_array a; for (int i = 0; i < 10; i++) { auto_ptr<int> p(new int(i)); a.push_back(p); } }
auto_ptr
Login in to like
Login in to comment
or Read more about C++ Quizzes
Login in to like
Login in to comment