Stačiakampio paklaida

Taškai: 0

Compile: FAIL

paklaida.cpp: In function ‘int main()’: paklaida.cpp:30:60: error: no matching function for call to ‘std::chrono::duration<long int, std::ratio<1l, 1000l> >::duration(double&)’ std::this_thread::sleep_for(std::chrono::milliseconds(a)); ^ In file included from paklaida.cpp:4:0: /usr/include/c++/5/chrono:270:14: note: candidate: template<class _Rep2, class _Period2, class> constexpr std::chrono::duration<_Rep, _Period>::duration(const std::chrono::duration<_Rep, _Period>&) constexpr duration(const duration<_Rep2, _Period2>& __d) ^ /usr/include/c++/5/chrono:270:14: note: template argument deduction/substitution failed: paklaida.cpp:30:60: note: mismatched types ‘const std::chrono::duration<_Rep1, _Period1>’ and ‘double’ std::this_thread::sleep_for(std::chrono::milliseconds(a)); ^ In file included from paklaida.cpp:4:0: /usr/include/c++/5/chrono:263:23: note: candidate: template<class _Rep2, class> constexpr std::chrono::duration<_Rep, _Period>::duration(const _Rep2&) constexpr explicit duration(const _Rep2& __rep) ^ /usr/include/c++/5/chrono:263:23: note: template argument deduction/substitution failed: /usr/include/c++/5/chrono:259:27: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ template<typename _Rep2, typename = typename ^ /usr/include/c++/5/chrono:257:2: note: candidate: std::chrono::duration<_Rep, _Period>::duration(const std::chrono::duration<_Rep, _Period>&) [with _Rep = long int; _Period = std::ratio<1l, 1000l>] duration(const duration&) = default; ^ /usr/include/c++/5/chrono:257:2: note: no known conversion for argument 1 from ‘double’ to ‘const std::chrono::duration<long int, std::ratio<1l, 1000l> >&’ /usr/include/c++/5/chrono:252:12: note: candidate: constexpr std::chrono::duration<_Rep, _Period>::duration() [with _Rep = long int; _Period = std::ratio<1l, 1000l>] constexpr duration() = default; ^ /usr/include/c++/5/chrono:252:12: note: candidate expects 0 arguments, 1 provided

nr.resulttimemessage