#include <iostream>
#include <sstream>
using namespace std;
int main() {
ostringstream oss;
unsigned char test = 50;
oss << "qqq" << test << "ddd" <<"\r\n";
cout << oss.str() << endl;
oss.str(""); //清空字符串 注意不是clear()函数!!!
unsigned int test1 = 50;
oss << "qqq" << test1 << "ddd" <<"\r\n";
cout << oss.str() << endl;
return 0;
}
** 注意char类型输出的是转义字符!!!**