fork(39) download
  1. #include <iostream>
  2. #include <locale.h>
  3.  
  4. int main() {
  5. std::locale::global(std::locale("")); // (*)
  6. std::wcout.imbue(std::locale());
  7. auto& f = std::use_facet<std::ctype<wchar_t>>(std::locale());
  8.  
  9. std::wstring str = L"Zoë Saldaña played in La maldición del padre Cardona.";
  10.  
  11. f.toupper(&str[0], &str[0] + str.size());
  12. std::wcout << str << std::endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 5088KB
stdin
Standard input is empty
stdout
ZOË SALDAÑA PLAYED IN LA MALDICIÓN DEL PADRE CARDONA.