Borderou de evaluare (job #2948999)

Utilizator lucian.stefanoaicaLucian S lucian.stefanoaica Data 29 noiembrie 2022 01:34:49
Problema Suma4 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In member function 'void Cell::addNextCell(Cell&)': main.cpp:92:37: error: no matching function for call to 'std::vector<std::reference_wrapper<Cell> >::push_back(Cell&)' 92 | nextCells.push_back(cell); | ^ In file included from /usr/include/c++/10/vector:67, from main.cpp:2: /usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::reference_wrapper<Cell>; _Alloc = std::allocator<std::reference_wrapper<Cell> >; std::vector<_Tp, _Alloc>::value_type = std::reference_wrapper<Cell>]' 1187 | push_back(const value_type& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from 'Cell' to 'const value_type&' {aka 'const std::reference_wrapper<Cell>&'} 1187 | push_back(const value_type& __x) | ~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::reference_wrapper<Cell>; _Alloc = std::allocator<std::reference_wrapper<Cell> >; std::vector<_Tp, _Alloc>::value_type = std::reference_wrapper<Cell>]' 1203 | push_back(value_type&& __x) | ^~~~~~~~~ /usr/include/c++/10/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from 'Cell' to 'std::vector<std::reference_wrapper<Cell> >::value_type&&' {aka 'std::reference_wrapper<Cell>&&'} 1203 | push_back(value_type&& __x) | ~~~~~~~~~~~~~^~~ main.cpp: In member function 'std::string Cell::toString()': main.cpp:98:30: error: conversion from 'std::reference_wrapper<Cell>' to non-scalar type 'Cell' requested 98 | for (Cell cell : nextCells) { | ^~~~~~~~~ main.cpp: In function 'MinAndPath computeMinimumSum(Cell&)': main.cpp:217:38: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<std::reference_wrapper<Cell> >, std::reference_wrapper<Cell> >::value_type' {aka 'std::reference_wrapper<Cell>'} to non-scalar type 'Cell' requested 217 | Cell firstCell = nextCells.at(0); | ~~~~~~~~~~~~^~~ main.cpp:221:29: error: conversion from 'std::reference_wrapper<Cell>' to non-scalar type 'Cell' requested 221 | for (Cell oneCell : nextCells) { | ^~~~~~~~~ In file included from /usr/include/c++/10/vector:67, from main.cpp:2: /usr/include/c++/10/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::reference_wrapper<Cell>; _Alloc = std::allocator<std::reference_wrapper<Cell> >]': /usr/include/c++/10/bits/stl_vector.h:487:7: required from here /usr/include/c++/10/bits/stl_vector.h:336:35: error: invalid use of incomplete type 'class std::reference_wrapper<Cell>' 336 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/bits/move.h:57, from /usr/include/c++/10/bits/nested_exception.h:40, from /usr/include/c++/10/exception:148, from /usr/include/c++/10/ios:39, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/fstream:38, from main.cpp:1: /usr/include/c++/10/type_traits:2160:11: note: declaration of 'class std::reference_wrapper<Cell>' 2160 | class reference_wrapper; | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/10/bits/stl_algobase.h:67, from /usr/include/c++/10/bits/char_traits.h:39, from /usr/include/c++/10/ios:40, from /usr/include/c++/10/istream:38, Non zero exit status: 1

Ceva nu functioneaza?