Borderou de evaluare (job #1867624)
Utilizator | Data | 4 februarie 2017 11:23:04 | |
---|---|---|---|
Problema | Colaj | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:4:29: error: ‘int y1 [110]’ redeclared as different kind of symbol
int x1[110], x2[110], y1[110], y2[110];
^
In file included from /usr/include/features.h:357:0,
from /usr/include/assert.h:37,
from /usr/include/c++/4.8/cassert:43,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:33,
from user.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:243:1: error: previous declaration of ‘double y1(double)’
__MATHCALL (y1,, (_Mdouble_));
^
user.cpp: In function ‘int main()’:
user.cpp:21:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
fscanf(in, "%d%d%d%d", &x1[i], &y1[i], &x2[i], &y2[i]);
^
user.cpp:21:62: warning: format ‘%d’ expects argument of type ‘int*’, but argument 4 has type ‘double (*)(double)throw ()’ [-Wformat=]
fscanf(in, "%d%d%d%d", &x1[i], &y1[i], &x2[i], &y2[i]);
^
user.cpp: In function ‘void filldrept(int)’:
user.cpp:64:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for (int j(y1[nr]); j <= y2[nr]; j++)
^
user.cpp:64:25: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘int’ [-fpermissive]
user.cpp: In function ‘void norm()’:
user.cpp:71:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
normx[x1[i]] = normx[x2[i]] = normy[y1[i]] = normy[y2[i]] = 0;
^
user.cpp:71:49: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘std::map<int, int>::key_type {aka int}’ [-fpermissive]
In file included from /usr/include/c++/4.8/map:61:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:80,
from user.cpp:1:
/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:89:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i] = normy[y1[i]], y2[i] = normy[y2[i]];
^
user.cpp:89:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y1[i] = normy[y1[i]], y2[i] = normy[y2[i]];
^
user.cpp:89:27: error: invalid conversion from ‘double (*)(double)throw ()’ to ‘std::map<int, int>::key_type {aka int}’ [-fpermissive]
In file included from /usr/include/c++/4.8/map:61:0,
from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:80,
from user.cpp:1:
/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:89:15: error: assignment of read-only location ‘*(y1 + ((sizetype)i))’
y1[i] = normy[y1[i]], y2[i] = normy[y2[i]];
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !