
19 Nov
2008
19 Nov
'08
5:17 p.m.
I do have graph typedef as a global. The original problem was, I am not allowed to define graph_t myGraph; without all the arguments like this: graph_t myGraph(array, edge_array + num_arcs, weights, num_nodes);
Since I don't know the arguments before fun_A, I need something like a "resize" operator, so that i can define graph_t outside the function, but declare it later inside the function.
You are definitely allowed to declare graph_t without any arguments, and you can use add_vertex and add_edge to insert data as needed. The graph will by dynamically resized as you add elements. Andrew Sutton andrew.n.sutton@gmail.com