Borderou de evaluare (job #1328550)
| Utilizator | Data | 28 ianuarie 2015 15:24:41 | |
|---|---|---|---|
| Problema | Cern | Status | done |
| Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.cpp:6:7: error: ‘int time’ redeclared as different kind of symbol
int s,time,circ;
^
In file included from /usr/include/pthread.h:26:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr-default.h:35,
from /usr/include/i386-linux-gnu/c++/4.8/bits/gthr.h:148,
from /usr/include/c++/4.8/ext/atomicity.h:33,
from /usr/include/c++/4.8/bits/ios_base.h:39,
from /usr/include/c++/4.8/ios:42,
from /usr/include/c++/4.8/istream:38,
from /usr/include/c++/4.8/fstream:38,
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:173:9: error: cannot bind ‘std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}’ lvalue to ‘std::basic_istream<char>&&’
f>>p>>s>>time;
^
In file included from /usr/include/c++/4.8/fstream:38:0,
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:174:9: error: invalid operands of types ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ and ‘const int’ to binary ‘operator%’
time%=totalLength;
^
user.cpp:174:9: error: in evaluation of ‘operator%=(time_t(time_t*)throw () {aka long int(long int*)throw ()}, const int)’
user.cpp:180:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(time>=120)
^
user.cpp:181:32: warning: pointer to a function used in arithmetic [-Wpointer-arith]
g<<p2(3,1,time-120);
^
user.cpp:181:31: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘int’ [-fpermissive]
g<<p2(3,1,time-120);
^
user.cpp:66:5: error: initializing argument 3 of ‘int p2(int, int, int)’ [-fpermissive]
int p2(int circle,int sense,int time)
^
user.cpp:183:24: error: invalid operands of types ‘int’ and ‘time_t(time_t*)throw () {aka long int(long int*)throw ()}’ to binary ‘operator-’
g<<360-time;
^
user.cpp:187:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(time>=180)
^
user.cpp:188:33: warning: pointer to a function used in arithmetic [-Wpointer-arith]
g<<p1(2,-1,time-180);
^
user.cpp:188:32: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘int’ [-fpermissive]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
