struct s{......}//声明了一个结构vector< s>temp(10);//一个矢量,已初始化vector< shared ptr< s>>sps(temp.size());//一个智能指针矢量
然后怎么把这个智能指针矢量用new初始化为temp中的值?
vector中每个元素一很个个赋值,用temp中每个元素地址