fork download
  1. #include <iostream>
  2. #include <sstream>
  3. using namespace std;
  4.  
  5. int main() {
  6. stringstream ss;
  7. string s;
  8. int x = 65; // 'A'
  9. ss << (char) (x & 0xff);;
  10. ss >> s;
  11. cout << s << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
A