fork download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <string>
  4.  
  5. class example {
  6. static const int x = 5;
  7. };
  8.  
  9.  
  10. int main()
  11. {
  12. std::string s("hello world");
  13.  
  14. std::transform(s.begin(), s.end(), s.begin(),
  15. [](char c) { return std::toupper(c); });
  16.  
  17. std::cout << "s is: " << s << std::endl;
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
s is: HELLO WORLD