Record Detail

Compile Error

prepare (1/3): 
finished

make (2/3): 
g++ -g -Wall -O2 -o main.o -c main.cpp 
In file included from main.cpp:11:0:
unsorted_heap.h: In member function 'virtual TYPE unsorted_heap<TYPE, COMP>::dequeue_min()':
unsorted_heap.h:69:11: error: expected nested-name-specifier before 'vector'
  typename vector<TYPE>::iterator iter_min = data.begin();
           ^~~~~~
unsorted_heap.h:69:11: error: expected '(' before 'vector'
unsorted_heap.h:70:11: error: expected nested-name-specifier before 'vector'
  typename vector<TYPE>::iterator iter = data.begin() + 1;
           ^~~~~~
unsorted_heap.h:70:11: error: expected '(' before 'vector'
unsorted_heap.h:71:9: error: 'iter' was not declared in this scope
  while (iter != data.end()) {
         ^~~~
unsorted_heap.h:71:9: note: suggested alternative: 'opterr'
  while (iter != data.end()) {
         ^~~~
         opterr
unsorted_heap.h:72:23: error: 'iter_min' was not declared in this scope
   if (compare(*iter, *iter_min)) {
                       ^~~~~~~~
unsorted_heap.h:72:23: note: suggested alternative: 'get_min'
   if (compare(*iter, *iter_min)) {
                       ^~~~~~~~
                       get_min
unsorted_heap.h:77:21: error: 'iter_min' was not declared in this scope
  TYPE return_val = *iter_min;
                     ^~~~~~~~
unsorted_heap.h:77:21: note: suggested alternative: 'get_min'
  TYPE return_val = *iter_min;
                     ^~~~~~~~
                     get_min
unsorted_heap.h: In member function 'virtual const TYPE& unsorted_heap<TYPE, COMP>::get_min() const':
unsorted_heap.h:85:11: error: expected nested-name-specifier before 'vector'
  typename vector<TYPE>::const_iterator iter_min = data.begin();
           ^~~~~~
unsorted_heap.h:85:11: error: expected '(' before 'vector'
unsorted_heap.h:86:11: error: expected nested-name-specifier before 'vector'
  typename vector<TYPE>::const_iterator iter = ++data.begin();
           ^~~~~~
unsorted_heap.h:86:11: error: expected '(' before 'vector'
unsorted_heap.h:87:9: error: 'iter' was not declared in this scope
  while (iter != data.end()) {
         ^~~~
unsorted_heap.h:87:9: note: suggested alternative: 'opterr'
  while (iter != data.end()) {
         ^~~~
         opterr
unsorted_heap.h:88:23: error: 'iter_min' was not declared in this scope
   if (compare(*iter, *iter_min)) {
                       ^~~~~~~~
unsorted_heap.h:88:23: note: suggested alternative: 'get_min'
   if (compare(*iter, *iter_min)) {
                       ^~~~~~~~
                       get_min
unsorted_heap.h:93:10: error: 'iter_min' was not declared in this scope
  return *iter_min;
          ^~~~~~~~
unsorted_heap.h:93:10: note: suggested alternative: 'get_min'
  return *iter_min;
          ^~~~~~~~
          get_min
main.cpp: In function 'int main(int, char**)':
main.cpp:84:6: warning: unused variable 'size' [-Wunused-variable]
  int size;
      ^~~~
In file included from main.cpp:10:0:
fib_heap.h: In instantiation of 'void fib_heap<TYPE, COMP>::enqueue(const TYPE&) [with TYPE = mapgrid; COMP = mapgrid_less]':
main.cpp:166:1:   required from here
fib_heap.h:126:13: error: no matching function for call to 'fib_heap<mapgrid, mapgrid_less>::node::node(const mapgrid&)'
  node *pn = new node(val);
             ^~~~~~~~~~~~~
fib_heap.h:55:8: note: candidate: fib_heap<mapgrid, mapgrid_less>::node::node()
  class node {
        ^~~~
fib_heap.h:55:8: note:   candidate expects 0 arguments, 1 provided
fib_heap.h:55:8: note: candidate: constexpr fib_heap<mapgrid, mapgrid_less>::node::node(const fib_heap<mapgrid, mapgrid_less>::node&)
fib_heap.h:55:8: note:   no known conversion for argument 1 from 'const mapgrid' to 'const fib_heap<mapgrid, mapgrid_less>::node&'
fib_heap.h:55:8: note: candidate: constexpr fib_heap<mapgrid, mapgrid_less>::node::node(fib_heap<mapgrid, mapgrid_less>::node&&)
fib_heap.h:55:8: note:   no known conversion for argument 1 from 'const mapgrid' to 'fib_heap<mapgrid, mapgrid_less>::node&&'
fib_heap.h:132:18: error: no match for 'operator>' (operand types are 'mapgrid' and 'mapgrid')
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_pair.h:462:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:462:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::pair<_T1, _T2>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:317:5: note: candidate: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator>(const reverse_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:317:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::reverse_iterator<_Iterator>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:355:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator>(const reverse_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:355:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::reverse_iterator<_Iterator>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1166:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
     operator>(const move_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1166:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::move_iterator<_IteratorL>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1172:5: note: candidate: template<class _Iterator> bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
     operator>(const move_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1172:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::move_iterator<_IteratorL>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6123:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6123:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6136:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6136:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6148:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator>(const _CharT* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6148:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   mismatched types 'const _CharT*' and 'mapgrid'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/tuple:39:0,
                 from /usr/include/c++/7/functional:54,
                 from priority_queue.h:4,
                 from main.cpp:8:
/usr/include/c++/7/array:270:5: note: candidate: template<class _Tp, long unsigned int _Nm> bool std::operator>(const std::array<_Tp, _Nm>&, const std::array<_Tp, _Nm>&)
     operator>(const array<_Tp, _Nm>& __one, const array<_Tp, _Nm>& __two)
     ^~~~~~~~
/usr/include/c++/7/array:270:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::array<_Tp, _Nm>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/functional:54:0,
                 from priority_queue.h:4,
                 from main.cpp:8:
/usr/include/c++/7/tuple:1429:5: note: candidate: template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const std::tuple<_Tps ...>&, const std::tuple<_Elements ...>&)
     operator>(const tuple<_TElements...>& __t,
     ^~~~~~~~
/usr/include/c++/7/tuple:1429:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::tuple<_Tps ...>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/vector:64:0,
                 from priority_queue.h:5,
                 from main.cpp:8:
/usr/include/c++/7/bits/stl_vector.h:1626:5: note: candidate: template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
     operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:1626:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:132:18: note:   'mapgrid' is not derived from 'const std::vector<_Tp, _Alloc>'
   if (min->value > pn->value) {
       ~~~~~~~~~~~^~~~~~~~~~~
In file included from main.cpp:9:0:
binary_heap.h: In instantiation of 'void binary_heap<TYPE, COMP>::perculatedown(int) [with TYPE = mapgrid; COMP = mapgrid_less]':
main.cpp:166:1:   required from here
binary_heap.h:113:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int child = 2 * hole + 1; child + 1 <= data.size(); child = 2 * hole + 1) {
binary_heap.h:114:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (child + 1 < data.size()) {
In file included from main.cpp:10:0:
fib_heap.h: In instantiation of 'fib_heap<TYPE, COMP>::node* fib_heap<TYPE, COMP>::dequeuenode(fib_heap<TYPE, COMP>::node*) [with TYPE = mapgrid; COMP = mapgrid_less]':
fib_heap.h:145:26:   required from 'TYPE fib_heap<TYPE, COMP>::dequeue_min() [with TYPE = mapgrid; COMP = mapgrid_less]'
main.cpp:166:1:   required from here
fib_heap.h:78:8: error: 'class fib_heap<mapgrid, mapgrid_less>::node' has no member named 'mark'; did you mean 'marked'?
    pn->mark = false;
    ~~~~^~~~
    marked
fib_heap.h:86:17: error: 'class fib_heap<mapgrid, mapgrid_less>::node' has no member named 'mark'; did you mean 'marked'?
     pn->parent->mark = true;
     ~~~~~~~~~~~~^~~~
     marked
fib_heap.h:98:7: error: 'class fib_heap<mapgrid, mapgrid_less>::node' has no member named 'mark'; did you mean 'marked'?
   pn->mark = false;
   ~~~~^~~~
   marked
fib_heap.h: In instantiation of 'void fib_heap<TYPE, COMP>::consolidate() [with TYPE = mapgrid; COMP = mapgrid_less]':
fib_heap.h:154:15:   required from 'TYPE fib_heap<TYPE, COMP>::dequeue_min() [with TYPE = mapgrid; COMP = mapgrid_less]'
main.cpp:166:1:   required from here
fib_heap.h:201:20: error: invalid static_cast from type '<unresolved overloaded function type>' to type 'float'
  const float arg = static_cast<float>(size);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
fib_heap.h:211:25: error: no match for 'operator<' (operand types are 'mapgrid' and 'mapgrid')
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:64:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_pair.h:449:5: note: candidate: template<class _T1, class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
     ^~~~~~~~
/usr/include/c++/7/bits/stl_pair.h:449:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::pair<_T1, _T2>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:305:5: note: candidate: template<class _Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
     operator<(const reverse_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:305:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::reverse_iterator<_Iterator>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:343:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
     operator<(const reverse_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:343:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::reverse_iterator<_Iterator>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1142:5: note: candidate: template<class _IteratorL, class _IteratorR> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
     operator<(const move_iterator<_IteratorL>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1142:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::move_iterator<_IteratorL>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/7/bits/char_traits.h:39,
                 from /usr/include/c++/7/string:40,
                 from main.cpp:3:
/usr/include/c++/7/bits/stl_iterator.h:1148:5: note: candidate: template<class _Iterator> bool std::operator<(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)
     operator<(const move_iterator<_Iterator>& __x,
     ^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1148:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::move_iterator<_IteratorL>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6085:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6085:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6098:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
     operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6098:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   'mapgrid' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/string:52:0,
                 from main.cpp:3:
/usr/include/c++/7/bits/basic_string.h:6110:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
     operator<(const _CharT* __lhs,
     ^~~~~~~~
/usr/include/c++/7/bits/basic_string.h:6110:5: note:   template argument deduction/substitution failed:
In file included from main.cpp:10:0:
fib_heap.h:211:25: note:   mismatched types 'const _CharT*' and 'mapgrid'
    if (A[degree]->value < pn->value) {
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/7/bits/ios_base.h:46:0,
                 from /usr/include/c++/7

Information

Submit By
Type
Submission
Homework
Project Three: Priority Queue and its Application
Language
GNU Make
Submit At
2018-11-11 21:10:42
Judged At
2018-11-14 02:04:02
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes