Borderou de evaluare (job #1248405)
Utilizator | Data | 25 octombrie 2014 08:29:34 | |
---|---|---|---|
Problema | Sortare prin comparare | Status | done |
Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:8:7: error: ‘vector’ does not name a type
vector<unsigned int> heap,
^
user.cpp: In constructor ‘HeapSort::HeapSort()’:
user.cpp:14:11: error: ‘size’ was not declared in this scope
size = 0;
^
user.cpp: In member function ‘void HeapSort::insertHeap(int)’:
user.cpp:23:12: error: ‘heap’ was not declared in this scope
heap.push_back( elem );
^
user.cpp:25:16: error: ‘size’ was not declared in this scope
up( size );
^
user.cpp: In member function ‘int HeapSort::removeHeap()’:
user.cpp:30:21: error: ‘heap’ was not declared in this scope
int ret = heap.pop_back();
^
user.cpp:32:23: error: ‘size’ was not declared in this scope
swap(1, size);
^
user.cpp: In member function ‘void HeapSort::down(int)’:
user.cpp:44:27: error: ‘size’ was not declared in this scope
while(2 * p <= size) {
^
user.cpp:48:42: error: ‘heap’ was not declared in this scope
if(2 * p + 1 <= size && heap[2 * p + 1] < heap[ 2 * p ]) c++;
^
user.cpp:50:21: error: ‘heap’ was not declared in this scope
if(heap[ p ] <= heap[ c ]) break;
^
user.cpp: In member function ‘void HeapSort::up(int)’:
user.cpp:66:26: error: ‘heap’ was not declared in this scope
if(heap[ p ] > heap[ c ]) {
^
user.cpp: In member function ‘void HeapSort::swap(int, int)’:
user.cpp:80:20: error: ‘heap’ was not declared in this scope
int x = heap[ a ] ^ heap[ b ];
^
user.cpp: In function ‘void do_heapsort()’:
user.cpp:107:29: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen(FIN, "r", stdin);
^
user.cpp:109:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
user.cpp:111:69: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
for(i = 1; i <= n; i++) scanf("%d", &elem), h.insertHeap( elem );
^
user.cpp:115:31: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !