
Hi all, I have a graph defined as follows (the same as in the Dijkstra shortest path example code): typedef adjacency_list < listS, vecS, directedS, no_property, property < edge_weight_t, float > > graph_t; The following works fine: graph_t myGraph(array, edge_array + num_arcs, weights, num_nodes); However, now I want to do the above line inside a function (say, fun_A), and I want another function (say, fun_B) to have access to "myGraph". How should I do that? I wish I could do something like this: graph_t myGraph; fun_A(graph_t &myGraph) { myGraph(array, edge_array + num_arcs, weights, num_nodes); } fun_B(graph_t &myGraph) { // using myGraph to run some graph algorithm... } but it doesn't work. Any suggestions? Thanks! -- View this message in context: http://www.nabble.com/-BGL--passing-a-graph-from-one-function-to-another-tp2... Sent from the Boost - Users mailing list archive at Nabble.com.