
Andrew Sutton-2 wrote:
main() { graph_t g = fun_A(); fun_B(g); }
I tried as you suggested, and it does work in Release mode (Visual Studio 2005), but NOT in Debug mode. Very strange. The CPU keeps running at the line return myGraph; and does not go further. Any suggestions? Thanks!
Debug it and break the process while its "stuck". That should give you some idea why it may not be working. It sounds like it may be broken copy constructor or some place variable wasn't initialized correctly.
It's also hard to say without more context. You might try posting your code or something similar to it.
Andrew Sutton andrew.n.sutton@gmail.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,
As suggested above, in my main function, I first create a graph, and then
pass the graph to the second function. The problem is, the program gets
stuck at the "return" statement in the first function, and never goes to the
second function. The strange thing is, the program works fine in VC2005
Release mode, but not in Debug mode. Here is the code:
main() {
graph_t g = BuildGraphShortestPath(Nnodes, N3mat, Nedge);
RunDijkstra(startPtInd, m_g);
}
graph_t BuildGraphShortestPath(unsigned long Nnodes, vnl_matrix<float>
&N3mat, int Nedge) {
graph_t g(Nnodes);
vertex_desc u, v;
float w = 0.0;
for (int i=0; i