Hi,
I am trying to copy vector to vector as follow:
Code:std::vector<unsigned char> vec1; //insert some values into vec1 std::vector<unsigned char> vec2; //now i wanto to copy 2 bytes from vec1 starting at index 5., why do i need to know how many bytes from the end of vec1?? can't i just specify how many bytes i want to copy from starting index? std::copy(vec1.begin()+5, vec1.end()-??, vec2.begin());




Reply With Quote