Anonymní profil Michal – Programujte.com
 x   TIP: Přetáhni ikonu na hlavní panel pro připnutí webu

Anonymní profil Michal – Programujte.comAnonymní profil Michal – Programujte.com

 

Příspěvky odeslané z IP adresy 84.42.204.–

Michal
C / C++ › make_heap
27. 11. 2012   #167696

Zdravim,

resim objektoveho dijkstra a narazil jsem na problem, se kterym si momentalne nevim rady. Budu vdecny, za kazdy napad.

src

graph.h http://pastebin.com/hZKQwuax
graph.cpp http://pastebin.com/4McSfB0S

pathcomp.h http://pastebin.com/uRFx4HaU
pathcompl.h http://pastebin.com/BfuW95sd

pathcompl.cpp http://pastebin.com/abVVYAyX

pathinfo.h http://pastebin.com/6d3iuVh2

pathinfo.cpp http://pastebin.com/Z15DdYnx
 

compile error

mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/graph.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/graph.o.d -o build/Debug/GNU-Linux-x86/graph.o graph.cpp
/usr/include/c++/4.6/bits/stl_heap.h: In function ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = Graph::MyVertex**, _Distance = int, _Tp = Graph::MyVertex*, _Compare = PathComp*]’:
In file included from /usr/include/c++/4.6/queue:63:0,
                 from graph.cpp:8:
/usr/include/c++/4.6/bits/stl_heap.h:436:4:   instantiated from ‘void std::make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Graph::MyVertex**, _Compare = PathComp*]’
graph.cpp:87:102:   instantiated from here
/usr/include/c++/4.6/bits/stl_heap.h:305:4: error: ‘__comp’ cannot be used as a function
/usr/include/c++/4.6/bits/stl_heap.h: In function ‘void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = Graph::MyVertex**, _Distance = int, _Tp = Graph::MyVertex*, _Compare = PathComp*]’:
/usr/include/c++/4.6/bits/stl_heap.h:318:7:   instantiated from ‘void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = Graph::MyVertex**, _Distance = int, _Tp = Graph::MyVertex*, _Compare = PathComp*]’
/usr/include/c++/4.6/bits/stl_heap.h:436:4:   instantiated from ‘void std::make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Graph::MyVertex**, _Compare = PathComp*]’
graph.cpp:87:102:   instantiated from here
/usr/include/c++/4.6/bits/stl_heap.h:182:7: error: ‘__comp’ cannot be used as a function
make[2]: *** [build/Debug/GNU-Linux-x86/graph.o] Error 1
make[2]: Leaving directory `/home/fuca/Projects/Cpp/ObjectiveDijkstra'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/fuca/Projects/Cpp/ObjectiveDijkstra'
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 655ms)

 

 

Hostujeme u Českého hostingu       ISSN 1801-1586       ⇡ Nahoru Webtea.cz logo © 20032024 Programujte.com
Zasadilo a pěstuje Webtea.cz, šéfredaktor Lukáš Churý