Greetings,
I am trying to perform a copy from one vector (vec1) to another vector (vec2) using the following 2 abbreviated lines of code (full test app follows):
Change reserve to resize():
vec2.resize(vec1.size(), '\0');
copy(vec1.begin(), vec1.end(), vec2.begin());
I believe that is the fix you need.
I can't give you a very good description on the difference, but basically reserve() makes sure you have enough space, and resize() actually inserts something in there.