fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <algorithm>
  4. #include <iterator>
  5. using namespace std;
  6.  
  7. int main() {
  8. std::string s("hello");
  9. std::vector<int> foo;
  10. std::transform(s.begin(), s.end(), back_inserter(foo), ::toupper);
  11. std::cout << std::string(foo.begin(), foo.end());
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
HELLO