fork download
  1. #include <iostream>
  2. #include <codecvt>
  3. #include <locale>
  4.  
  5. int main()
  6. {
  7. std::cout << std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t>().to_bytes(U'生' & U'死') << std::endl;
  8. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout