you can't use an auto_ptr in a stl container. You should use a boost::shared_ptr instead.