Code:
memcpy(static_cast<void *>(data), static_cast<void *>(data_), bytesRecorded);
This line can be wrong if compiled when char != 1.
Code:
memcpy(static_cast<void *>(data), static_cast<void *>(data_), bytesRecorded * sizeof(char));
Binary String? you mean like "01010101". Shouldn't that fit into chars? you can also cast char to unsigned char as well.

typedef basic_string<unsigned char> ustring;

Quote Originally Posted by THEARTOFWEB
I think for the moment I'll use this:
At least it looks better