fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4. #include <functional>
  5. #include <locale>
  6.  
  7. int main()
  8. {
  9. std::string a = "ABC";
  10.  
  11. std::transform(a.begin(), a.end(), a.begin(),
  12. std::bind2nd(std::ptr_fun(&std::tolower<char>), std::locale("")));
  13.  
  14. std::cout << a << std::endl;
  15. }
Success #stdin #stdout 0s 4556KB
stdin
Standard input is empty
stdout
abc