Borderou de evaluare (job #2184003)

Utilizator alexge50alexX AleX alexge50 Data 23 martie 2018 17:29:44
Problema Identice Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:12:10: error: use of ‘auto’ in parameter declaration only available with -std=c++14 or -std=gnu++14 auto top(auto v) {return (*v)[v->size() - 1];} ^~~~ user.cpp:12:16: error: ‘top’ function uses ‘auto’ type specifier without trailing return type auto top(auto v) {return (*v)[v->size() - 1];} ^ user.cpp:12:16: note: deduced return type only available with -std=c++14 or -std=gnu++14 user.cpp: In function ‘auto top(int)’: user.cpp:12:28: error: invalid type argument of unary ‘*’ (have ‘int’) auto top(auto v) {return (*v)[v->size() - 1];} ^ user.cpp:12:32: error: base operand of ‘->’ is not a pointer auto top(auto v) {return (*v)[v->size() - 1];} ^~ user.cpp: In function ‘long long int CountRectangles(char, int, std::vector<std::pair<int, int> >*)’: user.cpp:67:60: error: invalid conversion from ‘std::vector<std::pair<int, int> >*’ to ‘int’ [-fpermissive] while (!aux->empty() && lenSeq[l][c] <= top(aux).second) ^ user.cpp:12:6: note: initializing argument 1 of ‘auto top(int)’ auto top(auto v) {return (*v)[v->size() - 1];} ^~~ user.cpp:67:61: error: invalid use of ‘void’ while (!aux->empty() && lenSeq[l][c] <= top(aux).second) ^ user.cpp:68:29: error: invalid conversion from ‘std::vector<std::pair<int, int> >*’ to ‘int’ [-fpermissive] x += top(aux).first, aux->pop_back(); ^ user.cpp:12:6: note: initializing argument 1 of ‘auto top(int)’ auto top(auto v) {return (*v)[v->size() - 1];} ^~~ user.cpp:68:30: error: invalid use of ‘void’ x += top(aux).first, aux->pop_back(); ^ user.cpp: In function ‘int main()’: user.cpp:22:41: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%d %d %d ", &p, &n, &d); ^ user.cpp:26:42: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%c ", &m[l][c]); ^

Ceva nu functioneaza?