Borderou de evaluare (job #1687694)

Utilizator Ionut.popescuLiviu Rebreanu Ionut.popescu Data 13 aprilie 2016 00:34:43
Problema A+B Status done
Runda teme_upb Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:5:11: error: ‘int time [2]’ redeclared as different kind of symbol int time[2]; ^ In file included from /usr/include/c++/4.8/ctime:42:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:49, from user.cpp:1: /usr/include/time.h:186:15: error: previous declaration of ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^ user.cpp: In function ‘int main()’: user.cpp:10:15: warning: pointer to a function used in arithmetic [-Wpointer-arith] cin >> time[0] >> time[1]; ^ user.cpp:10: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.8/sstream:38:0, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from user.cpp:1: /usr/include/c++/4.8/istream:872: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 ()]’ operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^ user.cpp:10:26: warning: pointer to a function used in arithmetic [-Wpointer-arith] cin >> time[0] >> time[1]; ^ user.cpp:11:17: warning: pointer to a function used in arithmetic [-Wpointer-arith] cout << (time[0] + time[1]) << '\n'; ^ user.cpp:11:27: warning: pointer to a function used in arithmetic [-Wpointer-arith] cout << (time[0] + time[1]) << '\n'; ^ user.cpp:11:27: error: invalid operands of types ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ and ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ to binary ‘operator+’ user.cpp:8:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("adunare.in", "r", stdin); ^ user.cpp:9:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("adunare.out", "w", stdout); ^

Ceva nu functioneaza?