Boost logo

Boost Users :

From: Vladimir Prus (yg-boost-users_at_[hidden])
Date: 2003-03-13 09:47:14


Hi Dieter,

> I'm trying to create a graph that has a name for each vertex. Below is
> what I've come up with so far. I really don't know what's wrong with it.
> Can any of you help me out? I'm using boost 1.29.0 with Visual
> Studio6.0sp5 on win2k.
>
> I'm getting some errors on the line that's supposed to get the property
> map. Then a whole bunch of others because in the end 'name' has an
> incomplete type.

[...]

> // create some vertex names
> typedef std::set<std::string> StringSet;
> StringSet v_names;
> std::string names[] = { "v1", "v2", "v3" };
> v_names.insert(names, names + sizeof(names)/sizeof(names[0]));
>
> // declare the graph
> typedef boost::adjacency_list<boost::setS, boost::vecS,
> boost::directedS, boost::vertex_name_t, boost::no_property,
> boost::graph_name_t, boost::setS> Graph;
> Graph g(v_names.size());
>
> // get the property map for the vertex names
> boost::property_map<Graph, boost::vertex_name_t>::type name =
> boost::get(boost::vertex_name, g);

I'm afraid the information you given is not enough, especially for
folks without access to that specific compiler. It's much better to
post (1) complete and simple example which fails to compile and (2)
exact error messages. If you could try with CVS version, this would be
excellent.

Thanks,
Volodya


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