Record Detail

Compile Error

prepare (1/3): 
finished

make (2/3): 
g++ -o main main.cpp unsorted_heap.h 
In file included from main.cpp:12:0:
unsorted_heap.h:46:3: error: 'vector' does not name a type; did you mean 'perror'?
   vector<TYPE> data;
   ^~~~~~
   perror
unsorted_heap.h: In member function 'TYPE unsorted_heap<TYPE, COMP>::dequeue_min()':
unsorted_heap.h:70:16: error: 'data' was not declared in this scope
         return data[0];
                ^~~~
unsorted_heap.h: In instantiation of 'unsorted_heap<TYPE, COMP>::unsorted_heap(COMP) [with TYPE = node*; COMP = node::comp]':
main.cpp:124:38:   required from here
unsorted_heap.h:57:11: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
     this->data.push_back(std::move(TYPE()));
     ~~~~~~^~~~
unsorted_heap.h: In instantiation of 'void unsorted_heap<TYPE, COMP>::enqueue(const TYPE&) [with TYPE = node*; COMP = node::comp]':
main.cpp:135:42:   required from here
unsorted_heap.h:63:11: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
     this->data.push_back(val);
     ~~~~~~^~~~
unsorted_heap.h: In instantiation of 'TYPE unsorted_heap<TYPE, COMP>::dequeue_min() [with TYPE = node*; COMP = node::comp]':
main.cpp:138:41:   required from here
unsorted_heap.h:72:23: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
     auto temp = this->data[1];
                 ~~~~~~^~~~
unsorted_heap.h:77:33: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
         if (this->compare(this->data[i], temp)) {
                           ~~~~~~^~~~
unsorted_heap.h:78:26: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
             temp = this->data[i];
                    ~~~~~~^~~~
unsorted_heap.h:82:11: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
     this->data.erase(this->data.begin() + index);
     ~~~~~~^~~~
unsorted_heap.h:82:28: error: 'class unsorted_heap<node*, node::comp>' has no member named 'data'
     this->data.erase(this->data.begin() + index);
                      ~~~~~~^~~~
unsorted_heap.h: In instantiation of 'unsigned int unsorted_heap<TYPE, COMP>::size() const [with TYPE = node*; COMP = node::comp]':
unsorted_heap.h:107:18:   required from 'bool unsorted_heap<TYPE, COMP>::empty() const [with TYPE = node*; COMP = node::comp]'
main.cpp:136:27:   required from here
unsorted_heap.h:113:18: error: 'const class unsorted_heap<node*, node::comp>' has no member named 'data'
     return this->data.size() - 1;
            ~~~~~~^~~~
unsorted_heap.h:9:46: error: 'less' in namespace 'std' does not name a template type
 template<typename TYPE, typename COMP = std::less<TYPE> >
                                              ^~~~
unsorted_heap.h:9:50: error: expected '>' before '<' token
 template<typename TYPE, typename COMP = std::less<TYPE> >
                                                  ^
unsorted_heap.h:46:3: error: 'vector' does not name a type; did you mean 'qecvt_r'?
   vector<TYPE> data;
   ^~~~~~
   qecvt_r
unsorted_heap.h: In member function 'TYPE unsorted_heap<TYPE, COMP>::dequeue_min()':
unsorted_heap.h:70:16: error: 'data' was not declared in this scope
         return data[0];
                ^~~~
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1

build failed

Information

Submit By
Type
Submission
Homework
Project 5: Graph Algorithms
Language
GNU Make
Submit At
2020-08-10 20:57:01
Judged At
2020-08-10 20:57:01
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes