fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <string>
  4.  
  5. int main() {
  6.  
  7. using namespace std;
  8.  
  9. string str = "HELLO WORLD";
  10.  
  11. transform( str.begin(), str.end(), str.begin(), std::tolower<string::value_type> );
  12.  
  13. cout << str << endl;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/algorithm:63:0,
                 from prog.cpp:2:
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_algo.h: In function '_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >, _OIter = __gnu_cxx::__normal_iterator<char*, std::basic_string<char> >, _UnaryOperation = char (*)(char, const std::locale&)]':
prog.cpp:11:90:   instantiated from here
/usr/lib/gcc/i686-pc-linux-gnu/4.5.1/../../../../include/c++/4.5.1/bits/stl_algo.h:4688:2: error: too few arguments to function
stdout
Standard output is empty