Borderou de evaluare (job #3127842)

Utilizator darius1843Darius Suditu darius1843 Data 7 mai 2023 21:17:01
Problema Heapuri cu reuniune Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:262:14: error: field 'heap' has incomplete type 'BinomialHeap [105]' 262 | BinomialHeap heap[105]; | ^~~~ main.cpp:10:7: note: definition of 'class BinomialHeap' is not complete until the closing brace 10 | class BinomialHeap | ^~~~~~~~~~~~ main.cpp:262:22: error: redeclaration of '<typeprefixerror>BinomialHeap::heap' 262 | BinomialHeap heap[105]; | ^ main.cpp:24:18: note: previous declaration 'std::__cxx11::list<BinomialHeap::Node*> BinomialHeap::heap' 24 | list <Node*> heap; | ^~~~ main.cpp:292:2: error: expected '}' at end of input 292 | } | ^ main.cpp:11:1: note: to match this '{' 11 | { | ^ main.cpp: In member function 'BinomialHeap::Node* BinomialHeap::mergetree(Node*, Node*)': main.cpp:48:13: error: return-statement with no value, in function returning 'BinomialHeap::Node*' [-fpermissive] 48 | return; | ^~~~~~ main.cpp: In member function 'void BinomialHeap::adjust()': main.cpp:96:60: error: request for member 'sibling' in '* current.std::_List_iterator<BinomialHeap::Node*>::operator->()', which is of pointer type 'BinomialHeap::Node*' (maybe you meant to use '->' ?) 96 | if (current != heap.end()) next = current->sibling; | ^~~~~~~ main.cpp:101:70: error: request for member 'sibling' in '* current.std::_List_iterator<BinomialHeap::Node*>::operator->()', which is of pointer type 'BinomialHeap::Node*' (maybe you meant to use '->' ?) 101 | next = current == heap.end() ? heap.end() : current->sibling; | ^~~~~~~ main.cpp:109:1: error: expected primary-expression before 'public' 109 | public: | ^~~~~~ main.cpp:126:41: error: a function-definition is not allowed here before '{' token 126 | void MergeHeap(BinomialHeap& heap2) { | ^ main.cpp:200:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 200 | int extract_max() { | ^~ main.cpp:200:20: note: remove parentheses to default-initialize a variable 200 | int extract_max() { | ^~ | -- main.cpp:200:20: note: or replace parentheses with braces to value-initialize a variable main.cpp:200:23: error: a function-definition is not allowed here before '{' token 200 | int extract_max() { | ^ main.cpp: In member function 'int BinomialHeap::main()': main.cpp:275:17: error: no match for 'operator[]' (operand types are 'std::__cxx11::list<BinomialHeap::Node*>' and 'int') 275 | heap[poz1].insert(poz2); | ^ Non zero exit status: 1

Ceva nu functioneaza?