27 Aug
2010
27 Aug
'10
4 p.m.
Hi! You're allocating edges and weights on the stack: E edges[num_edges]; int weights[num_edges]; This is not a good idea, because stack space is very limited compared to the heap. Allocate these two vectors on the heap instead: E *edges = new E[num_edges]; int *weights = new int[num_edges]; .... delete[] edges; delete[] weights; Cheers, Gabe