大佬教程收集整理的这篇文章主要介绍了c – 使用graphviz绘制自定义BGL图,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
#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; }
但我得到以下错误:
我会非常感谢任何帮助
以上是大佬教程为你收集整理的c – 使用graphviz绘制自定义BGL图全部内容,希望文章能够帮你解决c – 使用graphviz绘制自定义BGL图所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。