I was solving SHPATH on spoj LINK. It is direct implementation of dijkstra's algorithm but my code is constantly giving runtime error. The error is always occuring when it is extracting last element from priority queue. Can anybody help and tell the reason ? LINK OF CODE
fixed code http://ideone.com/wovGYJ
see to //--->> see ... comments !!!
Why do you use VLA (variable length array) ??? — it's extension of GCC, not valid for C++, as know as.
Thanks.