Borderou de evaluare (job #1661907)

Utilizator PhilipDumitruPhilip Dumitru PhilipDumitru Data 24 martie 2016 11:56:25
Problema Heapuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In member function ‘void PhD::Heap<T>::downheap(long long int)’: user.cpp:34:25: error: ‘element’ was not declared in this scope if (element[heap[child]] < element[heap[child+1]]) ^ user.cpp:53:26: error: ‘element’ was not declared in this scope else if (element[heap[child]] < element[heap[node]]) ^ user.cpp: In destructor ‘PhD::Heap<T>::~Heap()’: user.cpp:82:20: error: expected primary-expression before ‘long’ delete long long int [s]; ^ user.cpp:82:20: error: expected ‘;’ before ‘long’ user.cpp:83:20: error: expected primary-expression before ‘long’ delete long long int[s]; ^ user.cpp:83:20: error: expected ‘;’ before ‘long’ user.cpp:84:21: error: expected primary-expression before ‘[’ token delete T[]; ^ user.cpp:84:22: error: expected primary-expression before ‘]’ token delete T[]; ^ user.cpp: In function ‘int main()’: user.cpp:119:15: error: missing template arguments before ‘heap’ PhD::Heap heap<long long>(n); ^ user.cpp:119:15: error: expected ‘;’ before ‘heap’ user.cpp:126:13: error: ‘heap’ was not declared in this scope heap.push(x); ^ user.cpp:131:13: error: ‘heap’ was not declared in this scope heap.deleteElement(x); ^ user.cpp:135:13: error: ‘heap’ was not declared in this scope heap.peak() ^ user.cpp:136:9: error: expected ‘;’ before ‘}’ token } ^ user.cpp:118:28: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%lld", &n); ^ user.cpp:122:32: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%lld", &k); ^ user.cpp:125:36: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%lld", &x); ^ user.cpp:130:36: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fin, "%lld", &x);

Ceva nu functioneaza?