Submission #3268834


Source Code Expand

#include<iostream>
#include<string>

#include <cstdlib>

#include <algorithm>

using namespace std;
int main(){
  string s;
  cin>>s;
  transform (s.begin (), s.end (), s.begin (), toupper);
  cout<<s<<endl;
}

Submission Info

Submission Time
Task B - 名前の確認
User wend
Language C++14 (GCC 5.4.1)
Score 0
Code Size 222 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:12:55: error: no matching function for call to ‘transform(std::basic_string<char>::iterator, std::basic_string<char>::iterator, std::basic_string<char>::iterator, <unresolved overloaded function type>)’
   transform (s.begin (), s.end (), s.begin (), toupper);
                                                       ^
In file included from /usr/include/c++/5/algorithm:62:0,
                 from ./Main.cpp:6:
/usr/include/c++/5/bits/stl_algo.h:4164:5: note: candidate: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
     transform(_InputIterator __first, _InputIterator __last,
     ^
/usr/include/c++/5/bits/stl_algo.h:4164:5: note:   template argument deduction/substitution failed:
./Main.cpp:12:55: note:   couldn't deduce template parameter ‘_UnaryOperation’
   transform (s.begin (), s.end (), s.begin (), toupper);
                                                       ^
In file included...