Submission #1304027
Source Code Expand
#include <iostream> #include<sstream> #include<vector> #include<iterator> #include<algorithm> using namespace std; int main(void) { string S; cin >> S; string str(S); transform(S.begin(), S.end(), str.begin(), tolower); str[0] = toupper(str[0]); cout << str << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - 名前の確認 |
User | callman |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 310 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:14:52: 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(), str.begin(), tolower); ^ In file included from /usr/include/c++/5/algorithm:62:0, from ./Main.cpp:5: /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:14:52: note: couldn't deduce template parameter ‘_UnaryOperation’ transform(S.begin(), S.end(), str.begin(), tolower); ^ In file included from /usr/i...