#include #include #include #include #include typedef boost::directed_graph< boost::property >, boost::property, boost::no_property> Graph; int main() { Graph g; boost::dynamic_properties dp; dp.property("node_id", get(boost::vertex_name, g)); dp.property("label", get(boost::edge_weight, g)); dp.property("len", get(boost::edge_weight, g)); write_graphviz_dp(std::cout, g, dp); return 0; }