Rikiavimas

Taškai: 0

Compile: FAIL

rikiavimas.cpp: In function ‘int main()’: rikiavimas.cpp:22:54: error: no matching function for call to ‘swap(bool)’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from /usr/include/c++/5/bits/stl_pair.h:59:0, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from rikiavimas.cpp:1: /usr/include/c++/5/bits/move.h:176:5: note: candidate: template<class _Tp> void std::swap(_Tp&, _Tp&) swap(_Tp& __a, _Tp& __b) ^ /usr/include/c++/5/bits/move.h:176:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: candidate expects 2 arguments, 1 provided if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from /usr/include/c++/5/bits/stl_pair.h:59:0, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from rikiavimas.cpp:1: /usr/include/c++/5/bits/move.h:195:5: note: candidate: template<class _Tp, long unsigned int _Nm> void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm]) swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) ^ /usr/include/c++/5/bits/move.h:195:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘_Tp [_Nm]’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from rikiavimas.cpp:1: /usr/include/c++/5/bits/stl_pair.h:254:5: note: candidate: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^ /usr/include/c++/5/bits/stl_pair.h:254:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::pair<_T1, _T2>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from rikiavimas.cpp:1: /usr/include/c++/5/bits/basic_string.h:5135:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> void std::swap(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/5/bits/basic_string.h:5135:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from rikiavimas.cpp:2:0: /usr/include/c++/5/fstream:1052:5: note: candidate: template<class _CharT, class _Traits> void std::swap(std::basic_filebuf<_CharT, _Traits>&, std::basic_filebuf<_CharT, _Traits>&) swap(basic_filebuf<_CharT, _Traits>& __x, ^ /usr/include/c++/5/fstream:1052:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::basic_filebuf<_CharT, _Traits>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from rikiavimas.cpp:2:0: /usr/include/c++/5/fstream:1059:5: note: candidate: template<class _CharT, class _Traits> void std::swap(std::basic_ifstream<_CharT, _Traits>&, std::basic_ifstream<_CharT, _Traits>&) swap(basic_ifstream<_CharT, _Traits>& __x, ^ /usr/include/c++/5/fstream:1059:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::basic_ifstream<_CharT, _Traits>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from rikiavimas.cpp:2:0: /usr/include/c++/5/fstream:1066:5: note: candidate: template<class _CharT, class _Traits> void std::swap(std::basic_ofstream<_CharT, _Traits>&, std::basic_ofstream<_CharT, _Traits>&) swap(basic_ofstream<_CharT, _Traits>& __x, ^ /usr/include/c++/5/fstream:1066:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::basic_ofstream<_CharT, _Traits>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^ In file included from rikiavimas.cpp:2:0: /usr/include/c++/5/fstream:1073:5: note: candidate: template<class _CharT, class _Traits> void std::swap(std::basic_fstream<_CharT, _Traits>&, std::basic_fstream<_CharT, _Traits>&) swap(basic_fstream<_CharT, _Traits>& __x, ^ /usr/include/c++/5/fstream:1073:5: note: template argument deduction/substitution failed: rikiavimas.cpp:22:54: note: mismatched types ‘std::basic_fstream<_CharT, _Traits>’ and ‘bool’ if (arr[j] > arr[j+1]) swap(arr[j] > arr[j+1]); ^

nr.resulttimemessage