Borderou de evaluare (job #1261152)
Utilizator | Data | 11 noiembrie 2014 23:37:10 | |
---|---|---|---|
Problema | Int | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:14: error: expected ‘;’ after struct definition
}
^
user.cpp: In function ‘int main()’:
user.cpp:28:15: error: request for member ‘x’ in ‘A[i]’, which is of non-class type ‘int’
fin >> A[i].x >> A[i].y;
^
user.cpp:28:25: error: request for member ‘y’ in ‘A[i]’, which is of non-class type ‘int’
fin >> A[i].x >> A[i].y;
^
user.cpp:32:6: error: no match for ‘operator=’ (operand types are ‘point’ and ‘int’)
poz = A[1];
^
user.cpp:32:6: note: candidates are:
user.cpp:6:8: note: point& point::operator=(const point&)
struct point {
^
user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘const point&’
user.cpp:6:8: note: point& point::operator=(point&&)
user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘point&&’
user.cpp:35:21: error: request for member ‘x’ in ‘A[i]’, which is of non-class type ‘int’
if (poz.y <= A[i].x){
^
user.cpp:36:8: error: no match for ‘operator=’ (operand types are ‘point’ and ‘int’)
poz = A[i];
^
user.cpp:36:8: note: candidates are:
user.cpp:6:8: note: point& point::operator=(const point&)
struct point {
^
user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘const point&’
user.cpp:6:8: note: point& point::operator=(point&&)
user.cpp:6:8: note: no known conversion for argument 1 from ‘int’ to ‘point&&’
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = bool (*)(point, point)]’:
/usr/include/c++/4.8/bits/stl_algo.h:2250:70: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = bool (*)(point, point)]’
/usr/include/c++/4.8/bits/stl_algo.h:5514:55: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = bool (*)(point, point)]’
user.cpp:30:29: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2183:29: error: could not convert ‘* __i’ from ‘int’ to ‘point’
if (__comp(*__i, *__first))
^
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = bool (*)(point, point)]’:
/usr/include/c++/4.8/bits/stl_algo.h:5363:59: required from ‘void std::partial_sort(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = bool (*)(point, point)]’
/usr/include/c++/4.8/bits/stl_algo.h:2355:68: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int*; _Size = int; _Compare = bool (*)(point, point)]’
/usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = bool (*)(point, point)]’
user.cpp:30:29: required from here
/usr/include/c++/4.8/bits/stl_algo.h:1972:27: error: could not convert ‘* __i’ from ‘int’ to ‘point’
if (__comp(*__i, *__first))
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !