#include #include #include #include #include #include #include #include using namespace std; #define INFINITY numeric_limits::max( ) struct Graph { int Name; int numberofPtrs; int shortestDistance; struct { int weight; int dest; } edges[5]; }; typedef struct Graph graph; typedef graph *graphPtr; int main() { int nodecount = 30, i; graphPtr myGraph; myGraph = (graphPtr)calloc(nodecount, sizeof(graph)); if(myGraph != NULL) { for(i=0; i, greater > q; for(i =0; i sum) { myGraph[myGraph[currNode].edges[i].dest].shortestDistance = sum; q.push(myGraph[currNode].edges[i].dest); } } } return 0; }