실행 실패 (제출 코드 컴파일 에러)
In file included from /usr/include/c++/11/string:52, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h: In instantiation of ‘constexpr void std::reverse(_BIter, _BIter) [with _BIter = int]’: Main.cpp:22:21: required from here /usr/include/c++/11/bits/stl_algo.h:1151:63: error: no matching function for call to ‘__iterator_category(int&)’ 1151 | std::__reverse(__first, __last, std::__iterator_category(__first)); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:65, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator_base_types.h:238:5: note: candidate: ‘template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&)’ 238 | __iterator_category(const _Iter&) | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/stl_iterator_base_types.h:238:5: note: template argument deduction/substitution failed: /usr/include/c++/11/bits/stl_iterator_base_types.h: In substitution of ‘template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]’: /usr/include/c++/11/bits/stl_algo.h:1151:63: required from ‘constexpr void std::reverse(_BIter, _BIter) [with _BIter = int]’ Main.cpp:22:21: required from here /usr/include/c++/11/bits/stl_iterator_base_types.h:238:5: error: no type named ‘iterator_category’ in ‘struct std::iterator_traits<int>’
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.