Boost logo

Boost Users :

From: Vivid Yang (yyd_iris_at_[hidden])
Date: 2005-04-14 16:22:33


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<int, vertex_descriptor> maps[5];
   int c = 0;
   graph_traits<graph_t>::vertex_iterator i, iend;
   for (tie(i, iend) = vertices(g); i != iend; ++i, ++c) {
          maps[c] = std::pair<int, vertex_descriptor>(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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net