Array of bytes

I use the basic_string class in my code:

string mystring;
mystring += "abc";
mystring += "d";

Is there is something like basic_string but for BYTES (not string)?
I want this array to contain non-readable bytes.
Something like this:

array myarray;
myarray +=0x12;
myarray +=0x00; // NULL!!
myarray +=0x01;
[363 byte] By [slcoder] at [2007-11-19 22:50:43]
# 1 Re: Array of bytes
You can do this using string:

string mystring;
mystring += "\x12";
mystring += "\x00";
mystring += "\x01";

EDIT: Or even better like this:

string mystring;
mystring +=0x12;
mystring +=0x00; // NULL!!
mystring +=0x01;
philkr at 2007-11-9 1:04:10 >
# 2 Re: Array of bytes
You can use vector:

std::vector< unsigned char > bytes;

bytes.push_back(0x12);
bytes.push_back(0x00);
bytes.push_back(0x01);
Viorel at 2007-11-9 1:05:16 >