VS.6-1998 vs. VS.9-2008 ? different vectors oder?
-
i try to compile this code from VS.9-2008 in VS.6-1998
void CMySerializable::appendCharVectorBytes(vector<unsigned char> &vucTo, vector<char> vuc) { appendUIntBytes(vucTo, vuc.size()); vucTo.insert(vucTo.end(), vuc.begin(), vuc.end()); }
but become error.
i change it sovoid CMySerializable::appendCharVectorBytes(vector<unsigned char> &vucTo, vector<char> vuc) { appendUIntBytes(vucTo, vuc.size()); vector<unsigned char>::iterator beg = (vector<unsigned char>::iterator) vuc.begin(); vector<unsigned char>::iterator end = (vector<unsigned char>::iterator) vuc.end(); vucTo.insert(vucTo.end(), beg, end); }
now it works.
for me it looks like:
i have vectors of a differen types:
vector<unsigned char> & vector<char>
in VS.6 1998 for such case
void insert(iterator it, const_iterator first, const_iterator last);
is not supported ! and only
void insert(iterator it, size_type n, const T& x);
is implemented and offered.
but why?
any suggestions?mfG
-
After 10 years there may be a different implementation.