Please, before anything else, edit your first post and add
[code] and
[/code] around your actual code, to format it.
I'm busy and don't have time right now to debug your program, but I'll just give you some general tips, and maybe another forum-goer can give more specific advice.
(1) Understand the problem logically, independent of the code.
Practice on paper. You have a graph in your file; I suggest physically drawing that graph on paper, and going through the algorithm yourself, step by step, to figure out why the correct answer is, in fact, correct.
(2) Break the problem down into parts that you can verify for correctness.
You say that the end result is not correct. But there's a lot of that happens between the start of your program and the end of it. Before you even perform Dijkstra's algorithm, are you sure the data in your graph structure is input correctly? Verify that your actual data structures look like how they should.
Figure out at which
exact step your program's behavior starts to diverge from what your hand-done steps. Then figure out why it's doing different behavior.
There's also plenty of pseudo-code available on the internet, that you might be able to apply.
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
_______________________________________
PS: Your code is strikingly similar to
http://www.cplusplus.com/forum/general/124853/
maybe read through that.
Also, this.
https://stackoverflow.com/questions/23401696/dijkstras-algorithm-with-adjacency-lists-and-priority-queue