Borderou de evaluare (job #2093005)

Utilizator usureluflorianUsurelu Florian-Robert usureluflorian Data 22 decembrie 2017 19:12:41
Problema Online Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:10:23: error: ‘usu’ does not name a type inline bool cmp(const usu &t1,const usu &t2) ^ user.cpp:10:28: error: ISO C++ forbids declaration of ‘t1’ with no type [-fpermissive] inline bool cmp(const usu &t1,const usu &t2) ^ user.cpp:10:37: error: ‘usu’ does not name a type inline bool cmp(const usu &t1,const usu &t2) ^ user.cpp:10:42: error: ISO C++ forbids declaration of ‘t2’ with no type [-fpermissive] inline bool cmp(const usu &t1,const usu &t2) ^ user.cpp: In function ‘bool cmp(const int&, const int&)’: user.cpp:12:11: error: request for member ‘a’ in ‘t1’, which is of non-class type ‘const int’ if(t1.a<t2.a) return 1; ^ user.cpp:12:16: error: request for member ‘a’ in ‘t2’, which is of non-class type ‘const int’ if(t1.a<t2.a) return 1; ^ user.cpp:13:11: error: request for member ‘a’ in ‘t1’, which is of non-class type ‘const int’ if(t1.a>t2.a) return 0; ^ user.cpp:13:16: error: request for member ‘a’ in ‘t2’, which is of non-class type ‘const int’ if(t1.a>t2.a) return 0; ^ user.cpp:14:11: error: request for member ‘b’ in ‘t1’, which is of non-class type ‘const int’ if(t1.b<t2.b) return 1; ^ user.cpp:14:16: error: request for member ‘b’ in ‘t2’, which is of non-class type ‘const int’ if(t1.b<t2.b) return 1; ^ user.cpp: In function ‘int main()’: user.cpp:70:23: error: ‘dif’ was not declared in this scope sol[t[i].poz]=dif; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from user.cpp:1: /usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = usu*; _Compare = bool (*)(const int&, const int&)]’: /usr/include/c++/4.8/bits/stl_algo.h:2250:70: required from ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = usu*; _Compare = bool (*)(const int&, const int&)]’ /usr/include/c++/4.8/bits/stl_algo.h:5514:55: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = usu*; _Compare = bool (*)(const int&, const int&)]’ user.cpp:26:23: required from here /usr/include/c++/4.8/bits/stl_algo.h:2183:29: error: invalid initialization of reference of type ‘const int&’ from expression of type ‘usu’ 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 = usu*; _Compare = bool (*)(const int&, const int&)]’: /usr/include/c++/4.8/bits/stl_algo.h:5363:59: required from ‘void std::partial_sort(_RAIter, _RAIter, _RAIter, _Compare) [with _RAIter = usu*; _Compare = bool (*)(const int&, const int&)]’ /usr/include/c++/4.8/bits/stl_algo.h:2355:68: required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = usu*; _Size = int; _Compare = bool (*)(const int&, const int&)]’ /usr/include/c++/4.8/bits/stl_algo.h:5513:44: required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = usu*; _Compare = bool (*)(const int&, const int&)]’ user.cpp:26:23: required from here

Ceva nu functioneaza?