#include
#include
using namespace std;
class MyClass {
};
int main( ) {
vector vec;
MyClass* p = NULL;
for (int i = 0; i < 10; i++) {
p = new MyClass( );
vec.push_back(p);
}
for (vector::iterator pObj = vec.begin( );
pObj != vec.end( ); ++pObj) {
delete *pObj;
}
vec.clear( );
}