I have an std::vector<unsigned char> with binary data in.
I just would like to simply read this vector, in a specific position with a specific size.
I would a function like this :
myvector.read(PositionBegin, Size)
myvector.read(1200,3)
This function could be read data from 1200, to 1203.
Is there a function like this in C++ ?
I’m assuming you want another std::vector with the range out…
This link provides a good answer: Best way to extract a subvector from a vector?
your function could look like: