Hey guys, i have a problem in implementing adjacency list through linked list.
my vertex struct has an object of neighbor struct, but an object of vertex cant access neighbor struct.
Below is just a piece of code for the particular part of adjacency list where i am facing problem.
node does not point to anything. You first need to do node = new vertex; then node->ed = new neighbor; and only then you can work with node->ed->next. See a tutorial on dynamic memory. wow, a triple post. that's rare :)