Hi,
I tried to compile dijkstra-example-listS (BGL CVS) in MSVC 6.0.
There were several errors.
In the code
tie(e, inserted) = add_edge(edge_array[j].first, edge_array[j].second, g);
The variable int edge_array[j].first and edge_array[j].second cannot be
converted to descriptors.
To solve this, I have to map int (A, B, C, D, E) to descriptor first:
std::pair maps[5];
int c = 0;
graph_traits::vertex_iterator i, iend;
for (tie(i, iend) = vertices(g); i != iend; ++i, ++c) {
maps[c] = std::pair(c, *i);
}
------------------------------------------------------------------
The same problem happens in dijkstra_shortest_paths.hpp
In the lines :
typename graph_traits<VertexListGraph>::vertex_iterator ui, ui_end;
put(distance, *ui, inf);
put(predecessor, *ui, *ui);
put(distance, s, zero);
They cannot convert descriptor s and (*ui) from (void *) to int
Here is the error description:
boost\boost_1_32_0\boost\graph\dijkstra_shortest_paths.hpp(211) : error
C2664: 'void __cdecl boost::put(int *,int,const double &)' : cannot
convert parameter 2 from 'void *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
Regards,
Vivid