Copy byte array to vector

hess_joel
hess_joel used Ask the Experts™
on
I need help trying to copy a byte array into a vector<byte>.

byte passthroughByte[20]=
{0x46, 0x47, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00,
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x55};

vector<byte> *vByte;

Ultimately I need to be able to call PassthroughEx(vector<BYTE> * pInBuf, vector<BYTE> * pOutBuf).
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2012
Commented:
The easiest way would be to

vector<BYTE> vByte(&passthroughByte[0],&passthroughByte[19]);
vector<BYTE> vOut;

PassthroughEx(&vByte,&vOut).
jkr
Top Expert 2012

Commented:
Ooops, make tha last line read

PassthroughEx(&vByte,&vOut);

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial