Job 6413

Owner
Custura Natanael
Problem
Peculiar Times
Contest
MindCoding 2015 Round 1
Source
0.98KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp:6:8: error: 'std::string time' redeclared as different kind of symbol
In file included from /usr/include/pthread.h:26:0,
                 from /usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr-default.h:41,
                 from /usr/include/c++/4.7/x86_64-linux-gnu/bits/gthr.h:150,
                 from /usr/include/c++/4.7/ext/atomicity.h:34,
                 from /usr/include/c++/4.7/bits/ios_base.h:41,
                 from /usr/include/c++/4.7/ios:43,
                 from /usr/include/c++/4.7/ostream:40,
                 from /usr/include/c++/4.7/iostream:40,
                 from prog.cpp:1:
/usr/include/time.h:186:15: error: previous declaration of 'time_t time(time_t*)'
prog.cpp: In function 'int main()':
prog.cpp:12:15: error: cannot bind 'std::istream {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&'
In file included from /usr/include/c++/4.7/iostream:41:0,
                 from prog.cpp:1:
/usr/include/c++/4.7/istream:866:5: error:   initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = long int(long int*)throw ()]'
prog.cpp:13:29: error: no matching function for call to 'std::basic_istringstream<char>::basic_istringstream(time_t (&)(time_t*)throw ())'
prog.cpp:13:29: note: candidates are:
In file included from prog.cpp:3:0:
/usr/include/c++/4.7/sstream:317:7: note: std::basic_istringstream<_CharT, _Traits, _Alloc>::basic_istringstream(const __string_type&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::basic_istringstream<_CharT, _Traits, _Alloc>::__string_type = std::basic_string<char>; std::ios_base::openmode = std::_Ios_Openmode]
/usr/include/c++/4.7/sstream:317:7: note:   no known conversion for argument 1 from 'time_t(time_t*)throw () {aka long int(long int*)throw ()}' to 'const __string_type& {aka const std::basic_string<char>&}'
/usr/include/c++/4.7/sstream:299:7: note: std::basic_istringstream<_CharT, _Traits, _Alloc>::basic_istringstream(std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::ios_base::openmode = std::_Ios_Openmode]
/usr/include/c++/4.7/sstream:299:7: note:   no known conversion for argument 1 from 'time_t(time_t*)throw () {aka long int(long int*)throw ()}' to 'std::ios_base::openmode {aka std::_Ios_Openmode}'

Questions?

Sponsors Gold