U are given the data(startnode,end node,cost) for each edge on a separate line but u dont no how much nodes u hav b4 hand how u declare it? how do u link the nodes in an adjacency list using linked list and not d <vector>?
TriniBabe 0 Newbie Poster
Recommended Answers
Jump to PostHeh, sorry but I'm about as useful as a hobo when it comes to graphs, as for linked lists, the basic format is:
struct list { int data; list *link; };
basically you create a list *a and link it to another list variable with *link inside …
Jump to PostI had to do a program like this (and am actually doing another like this now) so hopefully I can be of some help. When I did this program, I started out with an example and used that to help build my code. Perhaps you should start there and come …
All 7 Replies
TriniBabe 0 Newbie Poster
SeeTheLite 20 Junior Poster
TriniBabe 0 Newbie Poster
SeeTheLite 20 Junior Poster
TriniBabe 0 Newbie Poster
SeeTheLite 20 Junior Poster
DemonGal711 8 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.