Borderou de evaluare (job #2109451)
Utilizator | Data | 19 ianuarie 2018 19:22:10 | |
---|---|---|---|
Problema | Pariuri | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:4:11: error: ‘int time’ redeclared as different kind of symbol
int N, M, time, cash;
^
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/basic_string.h:39,
from /usr/include/c++/4.8/string:52,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/bits/stl_map.h:63,
from /usr/include/c++/4.8/map:61,
from user.cpp:2:
/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:21:40: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ [-Wformat=]
scanf("%d %d", &time, &cash);
^
user.cpp:23:23: error: invalid conversion from ‘time_t (*)(time_t*)throw () {aka long int (*)(long int*)throw ()}’ to ‘std::map<int, int>::key_type {aka int}’ [-fpermissive]
stats[time] += cash;
^
In file included from /usr/include/c++/4.8/map:61:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_map.h:476:7: error: initializing argument 1 of ‘std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = int]’ [-fpermissive]
operator[](key_type&& __k)
^
user.cpp:10:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("pariuri.in", "r", stdin);
^
user.cpp:11:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("pariuri.out", "w", stdout);
^
user.cpp:13:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
^
user.cpp:17:24: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &M);
^
user.cpp:21:41: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &time, &cash);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !