您好我有一個像升壓圖:加速圖形遞歸模板問題
struct Vertex;
struct Edge;
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, Vertex, Edge> Graph_t;
struct Vertex {
};
struct Edge {
typedef std::vector<Graph_t::vertex_descriptor> intermediate_vertices_t;
intermediate_vertices_t intermediate_vertices;
};
的問題是,在邊緣類遞歸模板。我需要存儲一個頂點向量。
你確定你有'Graph_t'右邊的模板參數嗎?第四個和第五個參數是_properties_,而不是頂點和邊的類本身......你必須爲頂點和邊集合提供一個合適的容器,'boost :: adjacency_list :: vertex_descriptor'只是指向那個類型的值容器(或多或少)。 –
你使用什麼編譯器。我已經編譯並在VC++ 2010中運行你的代碼沒有任何問題 – Eugene