#include <boost/scoped_array.hpp> #include <stdlib.h> int main(int argc, char **argv) { boost::scoped_array<int> x(new int[10]); x[0] = 1; x[1] = 2; return EXIT_SUCCESS; }