-
ASCII to string
Hey guys i am trying to convert mutiple ascii numbers to a single string. I can do this with one but not two this is what i tried but this didn't work.
Code:
int y = 65;
string word;
int z = 66;
word = int(y), int(z);
cout << word;
I'm really stuck on this one, thanks in advance.
-
I think this is what you're trying to do...
Code:
#include <sstream>
//...
int num1 = 65;
int num2 = 15;
ostringstream oss;
oss <<num1 <<num2;
//Now, oss.str() gives us our string
cout <<oss.str()
-
Sweet I got it to work. Thank you very much