Original Post
HI, I am trying to use the std::insert_iterator to copy data from a vector into another vector. I have the following code :- This is incorrect and does not compile but I am not exactly understanding how the insert iterator work. I could use an index variable and do it this way but I want to know whats the right way to do it. Thanks
for(int i = 0; i < numFrames; i++)
{
const Frame *f = file.GetFrame(i);
std::copy(f->m_Vertices.begin(), f->m_Vertices.end(),
std::insert_iterator<m_Vector.begin()>);
}
std::copy(f->m_Vertices.begin(), f->m_Vertices.end(),
m_Vector.begin() + index);