[英]drawing custom BGL graph with graphviz
我是Boost圖形庫的新手,我嘗試使用graphviz繪制圖形。
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graphviz.hpp>
#include <boost/utility.hpp> // for boost::tie
#include <iostream>
#include <utility> // for std::pair
using namespace boost;
using namespace std;
class V {};
class C {};
void draw_test(){
typedef boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, V, C > MyGraph;
typedef boost::graph_traits<MyGraph>::vertex_descriptor vertex_descriptor;
MyGraph g;
vertex_descriptor a = add_vertex(V(), g);
vertex_descriptor b = add_vertex(V(), g);
add_edge(a, b, g);
write_graphviz(std::cout, g);
}
int main() {
draw_test();
return 0;
}
但是我收到以下錯誤:
我將非常感謝您的幫助
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.