15,745,973 members
4.00/5 (1 vote)
See more:
plz give the code of shortest path finder in c++ with class and inheritance with using file handaling
Posted
Chandrasekharan P 16-Mar-12 5:07am
Are those 2 different questions?? if yes, then please phrase it properly. if no then i dont think you will get a shortest path finder with that combination.

## Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

nv3 16-Mar-12 5:13am
I admire the patience of you guys.

## Solution 2

You are on the wrong way:
While your tutor asked you to write the code for finding the shortest path, you are just trying to find the shortest path to get the code.

Nelek 16-Mar-12 14:34pm
Maybe he thought that "the order of the operands, doesn't affect the result" as in the multiplication. :P
By the way... 5 for making me laugh today
CPallini 16-Mar-12 16:02pm
Thank you. :-)
djmak 28-Mar-12 16:03pm
hahahaha!!!
nice sense of humor CPallini
CPallini 29-Mar-12 3:27am
Thank you.

## Solution 3

Hi,

You should research the algorithm by Edsger Dijkstra and some of the later improved algorithms such as A*.

Best Wishes,
-David Delaune

## Solution 4

If the problem is finding the shortest path between two nodes(graph nodes) its simple-use BFS(Breadth-First-Search) you can find the algorithm in Wikipedia. If its finding all short paths between one node and all others its Dijkstra.