Such a string does not represent 'weird characters', in my opinion (it represents the following character sequence
"000T102 000"
).
You have to:
- convert the string into an array of
unsigned char
s (each ordered pair of characters of your string represent an unsigned char
) - write the unsigned char array to a binary file (using, for instance
fwrite
function (or ofstream::write
method).