A
Angus
Hello
I am using ostringstream and want to write some ascii characters (not all
alphanumeric) to the stream.
I can do this sort of thing:
int value = 9;
oss << value;
and that works fine.
But I have some ascii values as hex - eg 0xa1. I can't do this:
oss << 0xa1;
Well, I can but I just get the decimal number of the value added. I just
want to append the ascii value to the string - it is a funny i sort of
character in this example.
Do I need to convert the 0xa1 into the relevant ascii symbol and then append
that? If so, how to convert? Is there a ostringstream function which will
do the conversion for me?
Angus
I am using ostringstream and want to write some ascii characters (not all
alphanumeric) to the stream.
I can do this sort of thing:
int value = 9;
oss << value;
and that works fine.
But I have some ascii values as hex - eg 0xa1. I can't do this:
oss << 0xa1;
Well, I can but I just get the decimal number of the value added. I just
want to append the ascii value to the string - it is a funny i sort of
character in this example.
Do I need to convert the 0xa1 into the relevant ascii symbol and then append
that? If so, how to convert? Is there a ostringstream function which will
do the conversion for me?
Angus